Skip to content

feat: add support for aws-lc-rs alongside ring#95

Open
sshockwave wants to merge 2 commits into
webrtc-rs:masterfrom
sshockwave:aws_lc_rs
Open

feat: add support for aws-lc-rs alongside ring#95
sshockwave wants to merge 2 commits into
webrtc-rs:masterfrom
sshockwave:aws_lc_rs

Conversation

@sshockwave

@sshockwave sshockwave commented May 26, 2026

Copy link
Copy Markdown

Closes #93
Part of webrtc-rs/webrtc#801

The roadmap listed post-quantum support in the "Future Exploration (Beyond 2027)" section. However, I think support for aws-lc-rs should gain more priority not because quantum computer is going to be realized anytime soon, but because the ecosystem (e.g. reqwest, rustls) is migrating towards aws-lc-rs by default. Requiring downstream crates to include two crypto providers is not a good idea. There were also discussions that ring was probably not intended for production use.

Crate rtc-ice and rtc-turn are also affected by the feature because they depend on rtc-stun, but I'm not sure I should add feature gates just to enable/disable the feature of a dependency. It seems recommended here but it is verbose and we seldom use these crates on their own anyway.

Test commands:

# `rtc` must be tested separately since interop tests needs `ring` dependency,
# which will clash with `aws-lc-rs` unless the `__testing` helper chooses a provider for `rustls`.
cargo test -p rtc --no-default-features --features aws-lc-rs,__testing

# I'm hesitant about adding a feature gate to the examples so it's still using the default `ring`
cargo test --workspace --exclude rtc --exclude rtc-examples --no-default-features --features aws-lc-rs

# The original test runs fine
cargo test --workspace

# No dependency leaks
cargo tree -e no-dev -i aws-lc-rs # expect an error
cargo tree -e no-dev -i ring --no-default-features --features aws-lc-rs

# Dependency listing works normally
cargo tree -e no-dev -i ring
cargo tree -e no-dev -i aws-lc-rs --no-default-features --features aws-lc-rs

By the way, will a similar PR to v0.17.x be accepted?

@sshockwave sshockwave marked this pull request as draft May 26, 2026 03:27
@sshockwave sshockwave force-pushed the aws_lc_rs branch 2 times, most recently from 996658c to 74f5fed Compare May 26, 2026 04:53
@sshockwave sshockwave marked this pull request as ready for review May 26, 2026 05:03
@sshockwave

Copy link
Copy Markdown
Author

Another way we could deal with the testing --all-targets failure is to use one of the providers when both features are enabled. I'd like to generate some warnings in this case but currently there's no direct way to do so in rust.

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.

rtc-dtls uses rustls with heardcoded feature "ring" which is incompatible with the "aws_lc_rs" feature enabled by e.g. reqwest by default

1 participant