Repository navigation
perf(channels): pin rustls to ring and drop the second crypto stack - #1312
Merged
Merged
Conversation
`channels` depended on `rustls = "0.23"` with default features, which selects aws-lc-rs. Everything else in the tree — reqwest via hyper-rustls, `host`, `cli`, `desktop` — already selects ring, so every shipped binary linked two complete TLS crypto stacks (aws-lc-sys is a BoringSSL fork built through CMake) and only one of them could ever be the installed provider: `run()` pins a provider explicitly, and `let _ =` swallowed the Err for whichever lost. Pin the same ring provider the other crates use and install it explicitly, so one stack is linked and the provider no longer depends on init order. Measured on macOS arm64 (`cargo build --release -p future-cli --bin future`): __text 42.9 MB -> 41.6 MB, and aws-lc-rs/aws-lc-sys/cmake/dunce/fs_extra leave Cargo.lock entirely, so the desktop and CLI release jobs stop building BoringSSL with CMake.
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.
What and why
channelsdepended onrustlswith default features, which selectsaws-lc-rs. Everything elsein the tree —
reqwestviahyper-rustls,host,cli,desktop— already selectsring, soevery shipped binary linked two complete TLS crypto stacks (
aws-lc-sysis a BoringSSL fork builtthrough CMake) and only one of them could ever be the installed provider:
run()pins oneexplicitly, and the
let _ =swallowed the error for whichever lost.This pins the same
ringprovider the rest of the tree uses and installs it explicitly, so onestack is linked and the provider no longer depends on init order.
Commits
perf(channels): pin rustls to ring and drop the second crypto stackVerification
Run in the main checkout at dev tip
40e31677con rustc 1.97.0, macOS arm64:cargo fmt --all -- --check— cleancargo clippy -p future-channel --all-targets -- -D warnings— cleancargo test -p future-channel --lib— 1498 passed, 0 failedTwo earlier runs of the same suite on this machine were red on load-sensitive timing tests
(
bridge::queue::…worker_stops), so the baseline was checked the same way: an unmodifiedorigin/maincheckout at the same moment failed a different timing test(
delivery::tests::the_queue_is_bounded_and_drops_finished_entries_first) while the machine sat atload average ~60 on 32 cores, and the dev tip then passed the full suite. That class of failure
reproduces on
origin/main, so it is saturation flakiness rather than this change.Notes
cargo build --release -p future-cli --bin future):__text42.9 MB -> 41.6 MB;
aws-lc-rs,aws-lc-sys,cmake,dunceandfs_extraleaveCargo.lockentirely, so the desktop and CLI release jobs stop building BoringSSL with CMake.run()already pinned a provider explicitly, and the ignored install errorstill covers the case where the embedding CLI installed one first.