feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split #2
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "wt/t_b7176a1b"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Android SDK + messenger in the same repo, alongside the Linux TUI. Not a WebView, not a rewrite:
src/tui.rsis untouched and the crate still builds, tests and clips clean on its default features.SDK —
crates/onionwire-sdk, a UniFFI façade over the sameonionwirecrate the TUI runs on. Identity, invite encode/decode, friend upsert-by-pubkey, list, send/receive, rotate and wipe all delegate to the existing code — no second protocol — so an Android peer and a Linux peer that exchange invites interoperate. Exposed as a Forgejo release asset (onionwire-sdk-0.1.0.aar+.sha256).APK —
android/, Kotlin + Jetpack Compose + Material 3.:sdkbuilds the AAR (UniFFI bindings generated at build time +libonionwire_sdk.sovia cargo-ndk);:appis a Compose messenger that depends on:sdkonly.Arti on Android: the one real decision
Arti's TLS backends are non-additive — exactly one of
native-tlsandrustlsmay be enabled per feature resolution. The TUI keepsnative-tls(OpenSSL, unchanged). Android has no OpenSSL in the NDK, so the SDK crate selectsrustls+static-sqlite.Rather than unify the two,
crates/onionwire-sdkis a standalone Cargo workspace that path-depends on the root package without joining its feature graph. The rootCargo.tomlonly grows two pass-through features:cargo buildfor the Linux crate therefore selects the exact same backend it always did. Flagging it because it is a manifest change to the TUI crate even though behaviour is identical.Spike result
arti-client0.46 withtokio, onion-service-client, onion-service-service, compression, rustls, static-sqlitecross-compiles foraarch64-linux-androidwith NDK r28c. No go/no-go blocker; this is a real build, not a clearnet fake.Layout
Verification (real output)
lib/arm64-v8a/carrieslibonionwire_sdk.so,libjnidispatch.so(JNA) andlibandroidx.graphics.path.so.Product decisions
arm64-v8aAPK inside Play's supported range. Cuts Android 7.1 and older. Documented inandroid/README.mdwith the-Ponionwire.api=escape hatch.FOREGROUND_SERVICE/notification in v1 — the node lives while the app does, and the UI says so.context.filesDir/onionwire,allowBackup=false+ explicitdata_extraction_rulesexclusions — an auto-backup ofonionwire.dbwould ship the wrapped message key and the plaintext identity keys off-device.sdk/consumer-rules.procarries the JNI keeps for when R8 is switched on together with a mapping-file upload path.ROTATEconfirmation in the app, never a single tap, and the result screen reportsnotified N/M.Not done here
v0.2.0/v0.1.1untouched.scripts/build-android-local.shacceptsPUBLISH_TAG=<tag>when you want the assets on a new release..soset, exported UniFFI symbols, signature, page alignment.Reviewer notes
The Android build needs a host with SDK/NDK — Pi CI is aarch64 Linux and cannot produce an APK, which is why this is
scripts/build-android-local.shand not a workflow change.