Skip to content

feat: add rustls Ring provider feature - #3068

Open
jcarver989 wants to merge 1 commit into
seanmonstar:masterfrom
contextbridge:upstream-rustls-ring
Open

feat: add rustls Ring provider feature#3068
jcarver989 wants to merge 1 commit into
seanmonstar:masterfrom
contextbridge:upstream-rustls-ring

Conversation

@jcarver989

Copy link
Copy Markdown

Summary

  • add a public rustls-ring feature parallel to rustls and rustls-no-provider
  • pass Ring directly to each rustls ClientConfig without installing a process-global CryptoProvider
  • prefer Ring when both provider features are unified
  • cover the feature in the CI matrix and test that building a client leaves the process default unset

This allows applications that standardize on Ring to select the provider through Cargo features, while preserving rustls as the AWS-LC-backed default and rustls-no-provider for application-managed providers.

Validation

  • cargo fmt --check
  • cargo check --no-default-features --features rustls-no-provider
  • cargo test --lib --no-default-features --features rustls-ring (47 passed)

Allow applications to select Ring entirely through Cargo features without installing a process-global crypto provider.
@gakonst

gakonst commented Jul 31, 2026

Copy link
Copy Markdown

Downstream validation: Nanocodex integrated this change at d45d0c3 to make ring its sole Rustls provider while preserving an embedding host process-level provider. gakonst/nanocodex#86 is merged; full Linux/macOS CI passed, and the six-target nightly published successfully from master SHA 4fd42ec168dce5b1dbacc1612055bc8755dc6505. We also ran cargo test --lib --no-default-features --features rustls-ring here (47 passed). The feature eliminated fresh-process CryptoProvider panics from direct reqwest Client construction and kept aws-lc out of the complete downstream graph.

@gakonst

gakonst commented Jul 31, 2026

Copy link
Copy Markdown

^ @seanmonstar any interest in getting this merged / released?

@Absolucy

Copy link
Copy Markdown

oh nice i was just about to do this myself, am tired of manually having to install the ring crypto provider bc i don't want aws-lc-sys nuking my build times lol

@In-line

In-line commented Aug 27, 2026

Copy link
Copy Markdown

Well, at work we were trying to compile 32 bit windows Rust crate and it was failing to build with aws-lc-sys.. Well, trying to disable it in reqwest, let us to do downgrade to reqwest 0.12.X.

I was also on my way to open PR, happy it's already done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants