Skip to content

fix: add rustls crypto provider initialization for ws/rtds examples#214

Open
Haut wants to merge 2 commits intoPolymarket:mainfrom
Haut:fix/rustls-crypto-provider
Open

fix: add rustls crypto provider initialization for ws/rtds examples#214
Haut wants to merge 2 commits intoPolymarket:mainfrom
Haut:fix/rustls-crypto-provider

Conversation

@Haut
Copy link
Contributor

@Haut Haut commented Jan 21, 2026

Fixes #210. The dependency tree enables both 'aws-lc-rs' and 'ring' crypto providers for rustls, preventing automatic provider selection at runtime. Examples now explicitly install the aws-lc-rs provider.

  • Add rustls dev-dependency with aws_lc_rs feature
  • Update websocket examples to initialize crypto provider
  • Update rtds example to initialize crypto provider

Fixes Polymarket#210. The dependency tree enables both 'aws-lc-rs' and 'ring'
crypto providers for rustls, preventing automatic provider selection
at runtime. Examples now explicitly install the aws-lc-rs provider.

- Add rustls dev-dependency with aws_lc_rs feature
- Update websocket examples to initialize crypto provider
- Update rtds example to initialize crypto provider
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.37%. Comparing base (cd15db8) to head (fa1e212).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #214   +/-   ##
=======================================
  Coverage   85.37%   85.37%           
=======================================
  Files          32       32           
  Lines        5106     5106           
=======================================
  Hits         4359     4359           
  Misses        747      747           
Flag Coverage Δ
rust 85.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Install the aws-lc-rs crypto provider for rustls.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any way we can just pick one instead of having to explicitly pick?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think so unless someone else knows how. Problem is dependencies pulling in different versions. Might just have to wait for one of them to update or something.

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.

Rustls error

2 participants

Comments