tools/arti-build/README.md
The four committed libarti_android.so files are built from the official Arti
source plus the JNI wrapper in this directory. The supported build path is the
pinned Linux container:
tools/arti-build/rebuild-in-container.sh
tools/arti-build/verify-checksums.sh
The container builds all four Android ABIs, verifies the exported JNI symbols
and rejects native binaries containing host-specific paths. It then rewrites
tools/arti-build/SHA256SUMS; both that manifest and the rebuilt libraries are
release inputs.
TOOLCHAIN.env: Arti tag and commit, stable build epoch, Rust, cargo-ndk,
Android NDK, and immutable Debian snapshotrust-toolchain.toml: Rust release and Android targetsCargo.lock: complete Rust dependency graphDockerfile: digest-pinned Rust base image and checksum-verified NDK archiveCargo.toml and src/lib.rs: JNI wrapper package and sourceRust source paths are remapped to stable virtual paths, incremental compilation
is disabled, and SOURCE_DATE_EPOCH is pinned to the value used for the
committed libraries.
Update the tag, full source commit, stable build epoch, tool versions,
archive name, and archive checksum in TOOLCHAIN.env.
Update Cargo.toml if Arti changed its crate features or wrapper version.
Regenerate Cargo.lock against the exact Arti checkout and review every
dependency change:
tools/arti-build/rebuild-in-container.sh --update-lockfile
Update the digest-pinned base image and rust-toolchain.toml when changing
Rust.
Run tools/arti-build/rebuild-in-container.sh twice from clean generated
state and confirm tools/arti-build/SHA256SUMS is unchanged.
Run the Android tests and the two-build release comparison described in
docs/reproducible-builds.md.
Do not build release native libraries with an unpinned local NDK or Rust
toolchain. build-arti.sh deliberately rejects mismatched tool versions.
The wrapper exports the native methods used by ArtiNative:
getVersionsetLogCallbackinitializestartSocksProxystopThe build fails if any expected symbol is absent. The NDK readelf check also
reports ELF load-segment alignment for Android's 16 KiB page-size requirement.