TODO: ship one rustls crypto provider; pkarr's relays are what keeps two

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Greg Shuflin
2026-10-03 18:31:13 -07:00
co-authored by Claude Opus 5.5
parent 94b52ac31a
commit b97bf4fb49
+26
View File
@@ -161,6 +161,32 @@ since it isn't worth taking before it shows up in a profile.
## Build & Development
### Ship one rustls crypto provider, not two
- **Description**: Two rustls crypto providers are compiled in. iroh uses `ring` (its
default `tls-ring`, plus `p2p/mod.rs`'s Android DNS-over-HTTPS config), and reqwest
uses `aws-lc-rs` (its `rustls` feature, the default features of our own `rustls`
dependency, and `http.rs`'s explicit provider). `aws-lc-sys` is a large native build:
it lengthens every cold build, the Android one included, and adds to the `.so`.
- **The blocker is pkarr.** Its `relays` feature, which `full-client` turns on, depends
on reqwest with `rustls` and therefore on aws-lc-rs, with no way to choose a provider.
The registry's `PkarrClient::builder()` uses both the DHT and those HTTPS relays, so
as long as relays are in, aws-lc-rs stays. Switching only our own code to ring would
save nothing and give up post-quantum key exchange on our HTTPS.
- **Options**:
- **ring everywhere.** Build pkarr with `dht` only, set reqwest to
`rustls-no-provider`, and install ring as the process default; the desktop's
`http_client.rs` and stream-download build their own reqwest clients. The cost is
the relay fallback, on networks that block UDP to the DHT. ring has no ML-KEM, and
its "Add Kyber" issue was closed as not planned, so this means no post-quantum key
exchange for the foreseeable future.
- **aws-lc-rs everywhere.** Set iroh and iroh-relay to `default-features = false`
with `tls-aws-lc-rs`. This keeps post-quantum key exchange everywhere, including
iroh's QUIC, but keeps the heavy native library.
- Ask pkarr upstream for a `rustls-no-provider`-style option, which would make the
first option possible without losing the relays.
- Verify any change with `cargo tree -i ring` and `cargo tree -i aws-lc-rs`, for
`--target aarch64-linux-android` as well as the host.
### Finish harmonizing the Android visual style with ADR 0032
- **Description**: The Android pass (ADR 0032 §10) landed the foundations, the whole
structural half, and all but one of the five gaps against the desktop