Demonstrating how to:
- Compile some Java code against
android.jar; - Create a
.dexfile from the resulting.class1; - Build an APK containing the
.dexfile and some Rust code in a.so; - Call a static class function in the aforementioned class from Rust code via
jni.
Install xbuild from a WIP branch with "dex packaging support":
cargo install --git https://github.com/rust-mobile/xbuild --branch classes-dexx devices
x run -p example --device adb:<device identifier>Footnotes
-
Expecting that this is later extended with user code,
jarfiles etc, all these raw inputs should likely be passed toxbuildinmanifest.yamlso that it can calld8to combine everything at once. ↩