- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Doc building for android
These are preliminary build instructions for Android. Note that ARM and Android integration are still very early and incomplete. This information is for hackers that want to work on the ARM port.
- 
setup android ndk standalone tool chain with platform=14 option Android NDK can be downloaded from http://developer.android.com/tools/sdk/ndk/index.html example command to setup standalone tool chain: ~/work/toolchains/android-ndk-r8c/build/tools$ ./make-standalone-toolchain.sh --platform=android-14 --install-dir=/home/ubuntu/work/toolchains/ndk_standalone --ndk-dir=/home/ubuntu/work/toolchains/android-ndk-r8c
- 
Download rustc from git repository a. git clone http://github.com/webconv/rust.git b. cd rust c. mkdir build d. cd build 
- 
Create Makefile using CMake cmake ../ -DTargetOsType=android -DTargetCpuType=arm -DToolchain=path_of_standalone_toolchain_dir 
- 
Build libuv and llvm make libuv make llvm 
- 
Create Makefile again (the Makefile made in step 3 does not contain information of llvm) cmake ../ 
- 
Build Rustc ( make and make install have been separated) a.make b.make install [ it will copy ARM libraries into /usr/local/lib/rustc/arm-unknown-android/lib 
- 
How to cross compiler rustc --target arm-unknown-android hello.rs 
- 
How to run on Android use adb -e push command to push all arm libs as specified in 6 b push your binary set LD_LIBRARY_PATH run using adb shell