Skip to content

fix: Add new feature flags to aws-creds and rust-s3 to allow for ring support#454

Open
dVeon-loch wants to merge 1 commit intodurch:masterfrom
dVeon-loch:fix/ring-tls-support
Open

fix: Add new feature flags to aws-creds and rust-s3 to allow for ring support#454
dVeon-loch wants to merge 1 commit intodurch:masterfrom
dVeon-loch:fix/ring-tls-support

Conversation

@dVeon-loch
Copy link
Copy Markdown

@dVeon-loch dVeon-loch commented Apr 13, 2026

Currently, enabling rustls TLS in aws-creds (rustls-tls) and rust-s3
(tokio-rustls-tls) hardcodes the aws-lc-rs crypto provider via
attohttpc/tls-rustls. This makes it impossible for downstream crates
to 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 - uses attohttpc/tls-rustls-webpki-roots-ring instead of attohttpc/tls-rustls
  • rust-s3: tokio-rustls-tls-ring - uses aws-creds/rustls-tls-ring instead of aws-creds/rustls-tls

The existing rustls-tls and tokio-rustls-tls features are unchanged
for 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/ring dep) currently have no way to avoid
pulling in aws-lc-sys transitively through rust-s3.


This change is Reviewable

Summary by CodeRabbit

  • New Features
    • Added rustls-tls-ring feature flag for alternative TLS configuration in the aws-creds crate
    • Added tokio-rustls-tls-ring feature flag for async TLS support in the s3 crate

… crypto provider instead of default aws-lc-sys
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d98a3b14-f7f7-41a2-bb59-a6c308b04bb8

📥 Commits

Reviewing files that changed from the base of the PR and between 3a9314f and 9def258.

📒 Files selected for processing (2)
  • aws-creds/Cargo.toml
  • s3/Cargo.toml

📝 Walkthrough

Walkthrough

Two new Cargo feature flags enable rustls with ring cryptography support: rustls-tls-ring in aws-creds and tokio-rustls-tls-ring in s3, allowing users to opt-in to alternative TLS implementations without affecting existing defaults.

Changes

Cohort / File(s) Summary
TLS Feature Additions
aws-creds/Cargo.toml, s3/Cargo.toml
Added feature flags rustls-tls-ring and tokio-rustls-tls-ring to enable rustls with ring cryptography support across the crate hierarchy, alongside existing TLS options.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Whiskers twitching with delight,
A ring of rustls shines so bright,
Two features bundled, strong and true,
TLS options—old and new!
🔐✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding new feature flags for ring TLS support to both aws-creds and rust-s3 crates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant