fix: Add new feature flags to aws-creds and rust-s3 to allow for ring support#454
fix: Add new feature flags to aws-creds and rust-s3 to allow for ring support#454dVeon-loch wants to merge 1 commit intodurch:masterfrom
Conversation
… crypto provider instead of default aws-lc-sys
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo new Cargo feature flags enable rustls with ring cryptography support: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Currently, enabling rustls TLS in aws-creds (
rustls-tls) and rust-s3(
tokio-rustls-tls) hardcodes the aws-lc-rs crypto provider viaattohttpc/tls-rustls. This makes it impossible for downstream cratesto use ring as their sole crypto provider, both providers end up
compiled into the binary.
This PR adds ring-specific feature flags:
aws-creds:rustls-tls-ring- usesattohttpc/tls-rustls-webpki-roots-ringinstead ofattohttpc/tls-rustlsrust-s3:tokio-rustls-tls-ring- usesaws-creds/rustls-tls-ringinstead ofaws-creds/rustls-tlsThe existing
rustls-tlsandtokio-rustls-tlsfeatures are unchangedfor backwards compatibility.
Why this matters
Compiling two crypto providers increases build times and binary size
with no runtime benefit. Crates that already use ring (e.g. via reqwest
0.12 or an explicit
rustls/ringdep) currently have no way to avoidpulling in aws-lc-sys transitively through rust-s3.
This change is
Summary by CodeRabbit
rustls-tls-ringfeature flag for alternative TLS configuration in theaws-credscratetokio-rustls-tls-ringfeature flag for async TLS support in thes3crate