onionwire/crates/onionwire-sdk/Cargo.toml
agent 0cacd41002
All checks were successful
ci / test (pull_request) Successful in 29m13s
ci / sdk (pull_request) Successful in 1m51s
android-ci / android (pull_request) Successful in 41m55s
deps: bump the Arti tor-* set to 0.49
tor-cell, tor-hsservice, tor-rtcompat and arti-client move together from
0.46 to 0.49 (Arti 2.9.0). safelog 0.9 -> 0.10 follows the set: it is a
direct dependency only for `DisplayRedacted`, and the 0.9 trait is a
different type from the one `HsId` implements under 0.49.

MSRV: Arti 0.49 requires rustc 1.92 (was 1.91). The declared floor stays
1.98 -- the default `cuprate-daemon` graph is still what sets it -- so
`rust-version`, RUST_IMAGE and the README install floor are unchanged;
only the "Arti itself builds on X" notes move to 1.92.

Upstream changes that could touch us, none of which do:
- tor-hsservice dropped the deprecated `onion_name()`; we use
  `onion_address()`.
- tor-cell's `Begin` API changed; we only decode `Connected`.
- tor-rtcompat's `Runtime` grew a `JoinSetProvider` bound; we use
  `PreferredRuntime` and implement no Runtime.
The src/hs.rs workarounds (PUBLISH_WAIT, CBT floors, empty predicted
ports) are untouched and their guard tests still pass.

Verified:
- cargo test --locked: 577 passed, 0 failed
- cargo clippy --locked --all-targets -- -D warnings: clean
- cargo test --locked --test tor_hs -- --ignored: two-node publish,
  byte pipe, restart and dormant path ok (106s, live Tor network)
- cargo test --locked --test two_node -- --ignored: plaintext absent
  from both nodes' arti/cache dirs (51s, live Tor network)
- crates/onionwire-sdk: cargo check --locked --all-targets ok
2026-12-02 01:57:27 -05:00

61 lines
2.5 KiB
TOML

[package]
name = "onionwire-sdk"
version = "0.1.0"
edition = "2024"
# Follows the root crate. The SDK builds onionwire with `default-features =
# false` (no `cuprate-daemon`), which would still compile on 1.92, but cargo
# checks the path dependency's `rust-version` anyway, and that floor is 1.98.
rust-version = "1.98"
description = "OnionWire Android/Kotlin SDK: in-process Arti onion transport, Noise IK, identity = ed25519 pubkey."
license = "MIT"
publish = false
# Standalone workspace on purpose: the SDK carries its own lockfile and its own
# crate set (Android: `static-sqlite`, rustls TLS), so it path-depends on the
# root package without joining its feature graph.
[workspace]
resolver = "2"
[lib]
name = "onionwire_sdk"
crate-type = ["cdylib", "lib"]
[features]
default = []
# The in-process Monero chain daemon (Cuprate). Off by default: it pulls a
# pinned `cuprated` git revision, ~152 crates and a C++ RandomX cross-build
# (+11.8 MiB on an aarch64 release binary). Without it the SDK can still store
# and read back a `ChainChoice.InProcessCuprate` setting — starting one fails
# with the core's "rebuild with --features cuprate-daemon" message.
cuprate-daemon = ["onionwire/cuprate-daemon"]
[dependencies]
onionwire = { path = "../..", default-features = false, features = ["rustls"] }
# `static-sqlite`: Android has no system libsqlite3 to link against.
arti-client = { version = "0.49", default-features = false, features = [
"tokio",
"onion-service-client",
"onion-service-service",
"compression",
"rustls",
"static-sqlite",
] }
tokio = { version = "1", features = ["rt-multi-thread", "time"] }
# rustls 0.23 resolves its provider from its OWN `ring` / `aws-lc-rs` features,
# never from whichever crypto crates happen to be linked in the graph. Arti
# pulls rustls in through `tor-rtcompat` with `default-features = false`, so
# without this line rustls compiles with zero providers and the first TLS config
# built from the process default fails at runtime — the "Failed to start /
# Could not automatically determine the process-level CryptoProvider" screen.
#
# `ring`, not `aws-lc-rs`: aws-lc-rs needs CMake and a C toolchain for the NDK
# and fights the Android cross-compile. The `ring` crate was already in the
# graph (via `snow`, for Noise) but that is a different thing entirely.
rustls = { version = "0.23", default-features = false, features = ["ring"] }
uniffi = { version = "0.32", features = ["cli", "tokio"] }
thiserror = "2"
[[bin]]
name = "uniffi-bindgen"
path = "src/bin/uniffi-bindgen.rs"