Skip to content

Collection of scripts to build Rust for mobile platforms.

Notifications You must be signed in to change notification settings

shebanghash/rust-mobile

 
 

Repository files navigation

rust-mobile

Collection of scripts to build Rust for iOS and Android platforms.

Hey! This project is OUTDATED. Nowadays you can get pre-built std library using rustup!

Requirements

Building

git clone https://github.com/Nercury/rust-mobile.git rust-mobile

For Android, have NDK installed and create and edit local.properties file:

cp local.properties.example local.properties

For iOS, it's enough to make sure XCode can build iOS projects. If not building for iOS, it is easy to comment out relevant lines in build-all.sh.

When ready, run it all with (from rust-build dir, although it does not matter much):

mkdir rust-build
cd rust-build
../rust-mobile/build-all.sh

All immediate files and the output will be places in rust-build dir.

Usage

To the resulting binaries should be integrated into multirust, so you can now compile things with (in your project dir):

multirust override ios
cargo build --target x86_64-apple-ios

Or:

multirust override android
cargo build --target arm-linux-androideabi --release

For the exact list of output platforms, look at build-android.sh and build-ios.sh scripts.

Used Resources

About

Collection of scripts to build Rust for mobile platforms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%