Cross-platform Mobile build tool for Rust based Apps — Supporting Android / iOS
$ cargo install kinito
# Compile your app into a APK
$ kinito build
# Load the appropriate APK onto your emulator / device
$ kinito device-install
Kinito let's you build native Android apps with Rust while not having to write any Java.
The entire build process is wrapped up into a simple command. This is achieved by embedding your rust app as a shared library within a NativeActivity.
A shell project is provided automatically, with your own app injected inside, then built using Gradle to produce runnable APKs.
Create standalone toolchains for each cpu arch you wish to build for.
(ie. arm, x86, mips)
Use $ANDROIDNDK/build/tools/makestandalone_toolchain.py to create the standalone toolchains.
Add a dylib section in your Cargo.toml
[lib]
crate-type = ["dylib"]
Place a .cargo/config to specify the linkers for each CPU ABI you wish to compile for.
[target.x8664-linux-android] linker = "/android/standalone-x8664/bin/x86_64-linux-android-gcc"
[target.arm-linux-androideabi] linker = "/android/standalone-arm/bin/arm-linux-androideabi-gcc"
Setup your android_main() entry point inside your app code. (ie. Setup OpenGL context)
See the examples for more details.
You can now achieve fast iterative development on the Desktop (x86) while building for mobile at the same time.
Use cross platform toolkits (ie. glutin) which supports Android/iOS/PC