Giter Site home page Giter Site logo

molanda / swift-everywhere-toolchain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vgorloff/swift-everywhere-toolchain

0.0 0.0 0.0 926 KB

Automated workflow to compile Swift Toolchain, for making Android apps with Swift.

License: MIT License

Ruby 42.67% Swift 2.95% Shell 9.21% JavaScript 44.55% C 0.38% C++ 0.26%

swift-everywhere-toolchain's Introduction

swift-everywhere-toolchain

Requirements

  • macOS 11.3
  • Xcode 12.5
  • Android Studio 4.1.3
  • Android NDK 21.4.7075529
  • Node 14.16.1 (node -v). Newer versions may also work, but not tested.
  • CMake 3.20.2 (cmake --version)
  • Ninja 1.10.2 (ninja --version)

Important

Keep tools like CMake and ninja up to date.

Using pre-built toolchain

Build of complete toolchain takes ~1.5h. Instead of building it you can just download and use already pre-built package from Releases page.

Setup and Build

  1. Check that CMake is installed. Install CMake if needed.

    which cmake
    brew install cmake
  2. Check that Ninja is installed. Install Ninja if needed.

    which ninja
    brew install ninja
  3. Check that Autotools is installed. Install Autotools if needed.

    which autoconf
    brew install autoconf
    
    which aclocal
    brew install automake
    
    which glibtool
    brew install libtool
    
    which pkg-config
    brew install pkg-config
  4. Check that git-lfs is installed. Install git-lfs if needed.

    which git-lfs
    brew install git-lfs
  5. Make sure that Xcode Build Tools properly configured.

    xcode-select --print-path
  6. Clone this repository.

    git clone https://github.com/vgorloff/swift-everywhere-toolchain.git
    cd swift-everywhere-toolchain
  7. Create a symbolic link to NDK installation directory.

    sudo mkdir -p /usr/local/ndk
    sudo ln -vsi ~/Library/Android/sdk/ndk/$VERSION /usr/local/ndk/$VERSION

    The placeholder $VERSION needs to be replaced with a version mentioned in file NDK_VERSION at the root of cloned repository.

  8. Start a build.

    node main.js
  9. Once the build completed, toolchain will be saved to folder ToolChain/swift-android-toolchain and compressed into archive ToolChain/swift-android-toolchain.tar.gz.

Usage

Please refer file Assets/Readme.md to see how to compile Swift files or build Swift packages using Toolchain.

Sample Projects

Sample projects can be found in a separate swift-everywhere-samples repository. Please look into Readme.md in that repository to get information about how to configure and build sample projects.

swift-everywhere-toolchain's People

Contributors

maxdesiatov avatar michalsrutek avatar vgorloff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.