Repository navigation
Only build the ring crypto provider for rustls - #61
Merged
Merged
Conversation
tokio-rustls is pulled in with its default features, which turn on rustls' aws_lc_rs provider. The TLS code installs ring as the process default (src/engine/tls.rs) and reqwest is already set up for ring, so aws-lc-sys gets compiled on every build and then thrown away at link time. Turn off the tokio-rustls defaults and ask for ring explicitly. That drops aws-lc-rs, aws-lc-sys, cmake, dunce, fs_extra and jobserver from Cargo.lock. The release binary is the same size; there's just less to build, and cross builds no longer have to compile aws-lc. That's what broke the OpenWrt build: aws-lc-sys' build script ran the host gcc with the target's CFLAGS.
6 tasks done
Owner
|
merged, tx dave. |
dave-atx
added a commit
to dave-atx/packages
that referenced
this pull request
Nov 3, 2026
cloudflare-speed-cli is a client for speed.cloudflare.com with a TUI and plain text / JSON output. Besides throughput it measures loaded latency, UDP packet loss and jitter, and can run a traceroute to the Cloudflare edge, which makes it handy for checking bufferbloat from the router. Two patches, both merged upstream after v1.0.11: - split arboard (X11 clipboard) out of the tui feature, so the TUI is built without it kavehtehrani/cloudflare-speed-cli#60 - build only the ring crypto provider; tokio-rustls' defaults also pulled in aws-lc-sys, which fails to cross-compile with OpenWrt's CFLAGS kavehtehrani/cloudflare-speed-cli#61 Not available on 32-bit mips / powerpc / ARMv5, which lack the 64-bit atomics the speed test uses, or on i386, where ring requires SSE2. Tested on bcm27xx/bcm2712 (Raspberry Pi CM5). I used Claude Code to help prepare this change. Signed-off-by: Dave Marquard <dave@marquard.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tokio-rustls = "0.26"comes with its default features, which turn on rustls'aws_lc_rsprovider. The app installs ring as the process default (src/engine/tls.rs#L26) and reqwest'srustls-tls*features already use ring, so aws-lc-sys gets compiled on every build and never linked. The release binary is the same size to the byte with or without it.This turns off the tokio-rustls defaults and asks for
logging,tls12andring, which drops aws-lc-rs, aws-lc-sys, cmake, dunce, fs_extra and jobserver from Cargo.lock.Where it bit me: cross-compiling for OpenWrt, aws-lc-sys' build script ran the host gcc with the target's CFLAGS and the build failed. With this change the OpenWrt package builds.
Checked with
cargo fmt --check, clippy-D warningson both--all-featuresand--no-default-features --features tui, andcargo test --all-features(114 passed).cargo tree -i aws-lc-syscomes back empty.