Demonstrating how to:
- Compile some Java code against
android.jar
; - Create a
.dex
file from the resulting.class
1; - Build an APK containing the
.dex
file 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-dex
x devices
x run -p example --device adb:<device identifier>
Footnotes
-
Expecting that this is later extended with user code,
jar
files etc, all these raw inputs should likely be passed toxbuild
inmanifest.yaml
so that it can calld8
to combine everything at once. ↩