Files
amethyst/tools/arti-build/rust-toolchain.toml
T
Claude 4406019059 fix(android): build Arti for all four shipped ABIs
The APK is split four ways (arm64-v8a, x86_64, armeabi-v7a, x86) and
create-release.yml publishes every one of them, but libarti_android.so
existed only for arm64-v8a and x86_64. The armeabi-v7a and x86 APKs
therefore installed with each dependency's native library present
(secp256k1's JNI ships all four ABIs) and Arti's missing:
System.loadLibrary throws, TorManager's status flow swallows the error,
and Tor reports Off for the life of the install. With the defaults
(TorType.INTERNAL, DM relays and unknown relays routed over Tor) those
relays then dial a SOCKS port nothing listens on and never connect, so
those ABIs lost their DMs as well as Tor.

Build Arti for armv7-linux-androideabi and i686-linux-android, and keep
the lists from drifting again:

- rust-toolchain.toml / build-arti.sh: all four targets by default, plus
  --target=<triple> to add one ABI without rewriting the .so files
  already committed.
- verify-reproducible.sh: verifies all four, or one ABI by triple.
- verifyArtiAbis (wired into preBuild): fails the build when an ABI
  split has no libarti_android.so, and names the build-arti.sh command
  that produces it.

Both new binaries come from the pinned Rust 1.98.1 + NDK 30.0.16248370,
export every JNI symbol, and link only libc/libm/libdl like the existing
two. 16 KB page alignment stays a 64-bit concern; the 32-bit libraries
link at 4 KB as their targets specify.

They have not been exercised on a 32-bit device or emulator.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MX1p385SiQMd2Lhkbg2YKc
2026-09-18 15:11:36 +00:00

24 lines
1.0 KiB
TOML

# Pin the exact Rust toolchain used to build libarti_android.so.
#
# Reproducibility: rustc output is only stable for a fixed compiler version, so
# everyone who rebuilds the shipped .so (us, F-Droid, an independent verifier)
# must use this exact toolchain. rustup reads this file automatically and
# installs the pinned version + the Android targets on first invocation of the
# build scripts. Bump this in lockstep with ARTI_VERSION / Cargo.lock and
# re-verify (see README.md → "Reproducible builds").
[toolchain]
channel = "1.98.1"
profile = "minimal"
components = ["rustc", "cargo", "rust-std"]
# One per ABI the APK is split for (see amethyst/build.gradle.kts -> splits.abi):
# every split that ships native code ships libarti_android.so too, or Tor is dead
# on that ABI for the life of the install. The `verifyArtiAbis` Gradle task holds
# the two lists together. check_prerequisites also adds any missing target on the
# fly.
targets = [
"aarch64-linux-android",
"x86_64-linux-android",
"armv7-linux-androideabi",
"i686-linux-android",
]