RED. The APK builds, installs and opens, but the first rustls config built
from the process default panics one call deep inside Arti's rustls backend:
Could not automatically determine the process-level CryptoProvider from
Rustls crate features.
Call CryptoProvider::install_default() before this point ...
rustls 0.23 picks its provider from its own 'ring' / 'aws-lc-rs' crate
features, not from which crypto crates happen to be linked. Arti reaches
rustls via tor-rtcompat with default-features = false, so neither provider
feature is on and rustls compiles with zero providers. 'ring' does appear in
cargo tree, pulled in by snow for Noise -- unrelated and irrelevant.
This commit adds rustls as an explicit dependency with no provider feature
(no behaviour change: it is already in the graph that way) so the test can
name the type, plus the regression test. On the host it reproduces the
device's panic verbatim.
The SDK lockfile is resynced with the root Cargo.toml on main (onionwire
0.2.1, rpassword, md-5, rtoolbox) in the same commit so the test build is
against a consistent lock.
48 lines
1.8 KiB
TOML
48 lines
1.8 KiB
TOML
[package]
|
|
name = "onionwire-sdk"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
rust-version = "1.91"
|
|
description = "OnionWire Android/Kotlin SDK: in-process Arti onion transport, Noise IK, identity = ed25519 pubkey."
|
|
license = "MIT"
|
|
publish = false
|
|
|
|
# Standalone workspace on purpose.
|
|
#
|
|
# Arti's TLS backends (`native-tls` vs `rustls`) are non-additive: exactly one
|
|
# may be enabled per feature resolution. The Linux TUI crate keeps native-tls,
|
|
# Android has no OpenSSL in the NDK and needs rustls. Two separate workspaces
|
|
# keep the two resolutions from colliding — this crate path-depends on the
|
|
# root package without joining its feature graph.
|
|
[workspace]
|
|
|
|
[lib]
|
|
name = "onionwire_sdk"
|
|
crate-type = ["cdylib", "lib"]
|
|
|
|
[dependencies]
|
|
onionwire = { path = "../..", default-features = false, features = ["rustls"] }
|
|
# `static-sqlite`: Android has no system libsqlite3 to link against.
|
|
arti-client = { version = "0.46", 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
|
|
# unless this crate turns a provider feature on, rustls compiles with zero
|
|
# providers and the first TLS config built from the process default fails at
|
|
# runtime. (Currently: no provider feature — see the regression test in
|
|
# `tests/provider_resolution.rs`.)
|
|
rustls = { version = "0.23", default-features = false }
|
|
uniffi = { version = "0.32", features = ["cli", "tokio"] }
|
|
thiserror = "2"
|
|
|
|
[[bin]]
|
|
name = "uniffi-bindgen"
|
|
path = "src/bin/uniffi-bindgen.rs"
|