onionwire/crates/onionwire-sdk/Cargo.toml
agent 7391c5b7a4
All checks were successful
android-ci / android (pull_request) Successful in 12m6s
ci / test (pull_request) Successful in 30m41s
ci / sdk (pull_request) Successful in 14m52s
ci: build the default graph on Rust 1.98, not 1.91
`cuprate-daemon` is a default feature, so `cargo test --locked` in the Pi CI
job compiles `tapes`. That crate calls `VecDeque::pop_front_if`, stable only
since 1.93. `rust:1.91-bookworm` dies with `error[E0658]: use of unstable
library feature 'vec_deque_pop_if'` after the rest of the graph has already
built. The Android workflows were already on 1.98 for this; ci.yml and
release.yml were left on 1.91 when the feature was off, and that is no longer
true.

`rust-version` moves with the image. cargo checks it before features, so a
1.91 compiler must be refused up front instead of fifteen minutes into
`tapes`. `--no-default-features` would still compile on 1.91; the declared
floor is the default build's floor, which is what CI and `cargo build` run.
2026-10-08 17:41:22 -04: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.91, 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.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
# 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"