rind

Run rustls on rind

This page describes rind-rustls as main has it, ahead of rind-rustls 0.23.3 on crates.io. Until its next release, take it from git at the commit this page describes. Beside the lines below, add this line under the [patch.crates-io] table of your workspace's root Cargo.toml (add the table if it has none), then run cargo update -p rind-rustls:

rind-rustls = { git = "https://github.com/kixel-ai/rind", rev = "80fc7ba544b53a6ca9ab21ba9a946c275eb19a06" }

That moves every crate in your tree that depends on rind-rustls, and cargo tree -i rind-rustls then shows it from git+https://github.com/kixel-ai/rind.

This crate provides an integration between rustls and rind, a fork of Graviola.

Turn off rustls's default features, which compile aws-lc-rs, and add this crate:

[dependencies]
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "logging"] }
rind-rustls = "0.23"

Use it like:

rind_rustls::default_provider().install_default().unwrap();

And then use rustls as normal.

Its API is rustls's crypto::aws_lc_rs provider's, item for item, so replacing rustls::crypto::aws_lc_rs with rind_rustls changes no other code. A dependency that turns on rustls's aws_lc_rs or ring feature still compiles that library; MIGRATING.md says which features of each such crate avoid it.

What rind cannot back

Behaves differently

WebAssembly

rind-rustls builds for wasm32-wasip2, where CI runs its tests under wasmtime, and for wasm32-unknown-unknown, the browser. rustls's aws-lc-rs provider builds for neither, and its ring one needs a C compiler targeting wasm. In the browser, turn on rind's JavaScript random source, getrandom = { version = "0.4", features = ["wasm_js"] }, and give rustls a clock, as any provider needs, such as rustls-pki-types = { version = "1", features = ["web"] }. rind's constant-time checks do not cover wasm; PLATFORMS.md says why.

Switch with an agent

Paste this into your coding agent, in your repository:

Move this repository from ring or aws-lc-rs to rind, following
https://raw.githubusercontent.com/kixel-ai/rind/main/MIGRATE.md

It migrates on a local branch, reports the build time, binary size, benchmarks, and tests before and after, and asks before opening a PR or filing an issue. To migrate by hand, MIGRATING.md maps each ring and aws-lc-rs item to rind's.

Other libraries