Skip to content

fix(bashkit-eval): install rustls provider for library providers#1606

Merged
chaliy merged 1 commit intomainfrom
2026-05-08-propose-fix-for-rustls-provider-issue
May 8, 2026
Merged

fix(bashkit-eval): install rustls provider for library providers#1606
chaliy merged 1 commit intomainfrom
2026-05-08-propose-fix-for-rustls-provider-issue

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 8, 2026

Motivation

  • reqwest is built with rustls-no-provider, so library consumers of bashkit-eval could construct providers and then fail/panic on the first HTTPS request when no process-wide rustls CryptoProvider is installed.
  • The binary main() already installed the ring provider, but public library constructors bypassed that initialization.

Description

  • Add ensure_rustls_crypto_provider() in crates/bashkit-eval/src/provider/mod.rs which installs the rustls::crypto::ring provider exactly once via OnceLock.
  • Call ensure_rustls_crypto_provider()? from each public provider constructor (OpenAiProvider::new, AnthropicProvider::new, OpenAiResponsesProvider::new) before creating reqwest::Client so library users get the same initialization as the binary.
  • Changes are minimal and keep existing binary initialization intact while covering the library path.

Testing

  • Ran cargo fmt successfully.
  • Ran cargo test -p bashkit-eval and all unit tests passed (9 passed; 0 failed).

Codex Task

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 8e687f8 Commit Preview URL May 08 2026, 09:13 AM

@chaliy chaliy force-pushed the 2026-05-08-propose-fix-for-rustls-provider-issue branch from a83bea1 to 8e687f8 Compare May 8, 2026 09:10
@chaliy chaliy merged commit bfe57ca into main May 8, 2026
16 checks passed
@chaliy chaliy deleted the 2026-05-08-propose-fix-for-rustls-provider-issue branch May 8, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant