onionwire/Cargo.toml
apk-dev 672f2c9990
All checks were successful
ci / test (pull_request) Successful in 3m22s
feat(android): SDK AAR (UniFFI) + Compose APK, Arti rustls feature split
Adds the Android product alongside the existing Linux TUI, in one repo.

SDK — crates/onionwire-sdk is a UniFFI facade over the very same `onionwire`
crate the TUI runs on. Identity, invite, friend upsert, send/receive, rotate
and wipe all delegate; no protocol is reimplemented, so an Android peer and a
Linux peer interoperate. It is its own Cargo workspace because Arti's TLS
backends are non-additive: the TUI keeps native-tls (OpenSSL), Android needs
rustls + static-sqlite (no OpenSSL, no system libsqlite3 in the NDK).

android/ — Gradle project. :sdk produces the AAR (Kotlin bindings generated at
build time + libonionwire_sdk.so via cargo-ndk), :app is a Kotlin/Compose/M3
messenger depending on :sdk only. minSdk 26, targetSdk/compileSdk 36,
INTERNET-only, data in filesDir, backups excluded.

Root Cargo.toml grows `native-tls` (default) and `rustls` features so exactly
one Arti TLS backend is selected per build graph. The default build is
unchanged: same backend, ratatui still a normal dependency, src/tui.rs
untouched.

Also: Store::self_fingerprint/set_petname + Node wrappers (additive only),
scripts/build-android-local.sh, README sections, .gitignore for local SDK paths.
2026-09-10 18:20:19 -04:00

49 lines
1.7 KiB
TOML

[package]
name = "onionwire"
version = "0.2.0"
edition = "2024"
rust-version = "1.91"
description = "Lean Tor messenger: Arti in-process, identity=pubkey, onion=locator. No XMPP."
license = "MIT"
publish = false
repository = "https://github.com/sirius0xdev/onionwire"
# The Linux TUI build is unchanged: `default` keeps Arti's native-tls
# (OpenSSL) backend exactly as before, and ratatui remains a normal
# dependency so `src/tui.rs` is untouched.
#
# Android has no OpenSSL in the NDK, so the SDK crate depends on this crate
# with `default-features = false, features = ["rustls"]`. Arti marks these two
# backends non-additive, so exactly one may be selected per build graph — hence
# exposing them as crate features.
[features]
default = ["native-tls"]
native-tls = ["arti-client/native-tls"]
rustls = ["arti-client/rustls"]
[dependencies]
arti-client = { version = "0.46", default-features = false, features = [
"tokio",
"onion-service-client",
"onion-service-service",
"compression",
] }
futures = "0.3"
safelog = "0.9"
ed25519-dalek = { version = "2", features = ["rand_core"] }
rand = "0.8"
rusqlite = { version = "0.36", features = ["bundled"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "time", "net"] }
tor-cell = "0.46"
tor-hsservice = "0.46"
tor-rtcompat = { version = "0.46", features = ["tokio"] }
ratatui = { version = "0.30.2", default-features = false, features = ["crossterm"] }
x25519-dalek = { version = "2", features = ["static_secrets"] }
snow = "0.10"
serde_json = "1"
argon2 = "0.5"
chacha20poly1305 = "0.10"
[dev-dependencies]
tempfile = "3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }