docs: Cuprate cross-compiles for Android aarch64 (NDK r28c, minSdk 26)

Spike evidence for the Phase 1 Android question: cargo check --release --target
aarch64-linux-android exits 0 and the PoC binary links as an Android 26 aarch64 ELF.
Documents the env recipe, the four link args the C++ RandomX build needs, the
cargo-ndk linker-wrapper bug, and the RANDOMX_DIR/DARCH no-op.
This commit is contained in:
rust-dev 2026-09-16 23:58:25 -04:00
commit e0bd4e4218
No known key found for this signature in database
2 changed files with 152 additions and 1 deletions

View file

@ -221,7 +221,7 @@ This card does **not** pre-empt the existing subprocess-based cards in §9 — t
**Strategic recommendation (hybrid phased approach):**
- **Phase 1:** Use Cuprate in-process for the chain daemon (P2P + consensus + RandomX). Keep `monero-wallet-rpc` as a subprocess pointing at the in-process Cuprate node over localhost RPC. Cuprate's RPC mirrors `monerod`'s, so `monero-wallet-rpc` talks to it using the same JSON-RPC calls. This eliminates the ~52 MB `monerod` binary while preserving all wallet code. Binary overhead: +5.6 MB stripped. Android: bundle only `monero-wallet-rpc` (~4 MB/ABI) instead of both `monerod` (~52 MB) + `monero-wallet-rpc`.
- **Phase 1:** Use Cuprate in-process for the chain daemon (P2P + consensus + RandomX). Keep `monero-wallet-rpc` as a subprocess pointing at the in-process Cuprate node over localhost RPC. Cuprate's RPC mirrors `monerod`'s, so `monero-wallet-rpc` talks to it using the same JSON-RPC calls. This eliminates the ~52 MB `monerod` binary while preserving all wallet code. Binary overhead: +5.6 MB stripped. Android: bundle only `monero-wallet-rpc` (~4 MB/ABI) instead of both `monerod` (~52 MB) + `monero-wallet-rpc`. The Android cross-compile is **verified**: `cargo check --release --target aarch64-linux-android` exits 0 and the binary links as an Android 26 aarch64 ELF — env recipe and the required C++/builtins link args in [`cuprate-android-spike.md`](cuprate-android-spike.md).
- **Phase 2 (future):** Only after Phase 1 is stable, consider replacing `monero-wallet-rpc` with the [`monero-wallet`](https://crates.io/crates/monero-wallet) crate (from the monero-oxide workspace). This is a transaction construction library, not a full wallet — replacing wallet-rpc requires reimplementing seed/key storage, address derivation, balance tracking, and output selection. Major effort.