Make rustls-platform-verifier an optional feature#3018
Open
faern wants to merge 1 commit into
Open
Conversation
Split rustls-platform-verifier out of the rustls and rustls-no-provider feature lists into its own rustls-platform-verifier feature. The default behaviour is preserved via default-tls pulling both rustls and rustls-platform-verifier. This lets users that set default-features = false and select only rustls (or rustls-no-provider) drop rustls-platform-verifier and its transitive deps (rustls-native-certs, openssl-probe) from the build. Such callers must now either enable rustls-platform-verifier or supply trust roots with tls_certs_only(). Breaking per Cargo semver rules because dep:rustls-platform-verifier is removed from existing feature lists.
Owner
|
I don't like the no-X features either. I hate them. But I messed it up again. They're needed until another breaking change, and I'd rather not make one so soon after the previous one. |
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.
Split
rustls-platform-verifierout of therustlsandrustls-no-providerfeature lists into its ownrustls-platform-verifierfeature. The default behaviour is preserved viadefault-tlspulling bothrustlsandrustls-platform-verifier.This lets users that set
default-features = falseand select onlyrustls(orrustls-no-provider) droprustls-platform-verifierand its transitive deps (rustls-native-certs,openssl-probeand other problematic stuff) from the build. Such callers must now either enablerustls-platform-verifieror, more likely what they want: supply trust roots withtls_certs_only().Breaking per Cargo semver rules because
dep:rustls-platform-verifieris removed from existing feature lists.This solves #2948.
This is an alternative implementation to #3008.
I personally do not really believe in the
no-Xstyle features. I think that's what caused the feature explosion we have seen here in the past.rustls-no-x-no-yscales badly. For the same reason, if reqwest is making a breaking release, I believe it would be possible to design this withoutrustls-no-provideralso.