Expand description
Android NDK builds: the JNI cdylib for each ABI, installed into jniLibs/.
The JVM records and diffs on the host; an Android app needs the same library built for
its ABIs instead. This links with the NDK’s clang directly, so cargo-ndk is not needed:
the only moving parts are the linker path and the Rust target.
The recording step still runs on a desktop JVM (phase 3, on-device recording, is not
implemented). What this adds is a library Gradle can package: <crate>/jniLibs/<abi>/lib*.so.
Structs§
Enums§
Constants§
- DEFAULT_
ABIS - The ABIs built when
--abiis not given: phones (64 and 32 bit) and emulators. - DEFAULT_
API - The API level the libraries target when
--apiis not given. - MIN_API
- The generated Java runtime uses
java.util.Optionalandjava.util.function(API 24) andThreadLocal.withInitial(API 26), so libraries built for a lower API would load but fail in the wrapper before the first call reaches Rust. API 26 is the honest floor.
Functions§
- build
- Builds the JNI library for each ABI and installs it under
<out>/<abi>/. - check_
api - The generated Java runtime needs API 26+ even though the NDK itself can link for API 21.
- ndk_
root - The NDK root:
--ndk, thenANDROID_NDK_HOME/ANDROID_NDK_ROOT, then the newest complete NDK underANDROID_HOME/ANDROID_SDK_ROOT, then the usual SDK folders. - sdk_
folders