Crate features / rustls
Feature flags · rustls 0.23.46 · from crates.io 2026-10-24
rustls features: what each one does, and the line to copy
Short answerrustls 0.23.46 has 12 features. By default it turns on aws_lc_rs, logging, prefer-post-quantum, std, tls12; add default-features = false to start from nothing. It needs Rust 1.71 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
aws-lc-rs | aws_lc_rs | |
aws_lc_rs | yes | dep:aws-lc-rs, webpki/aws-lc-rs, aws-lc-rs/aws-lc-sys, aws-lc-rs/prebuilt-nasm |
brotli | dep:brotli, dep:brotli-decompressor, std | |
custom-provider | nothing else (a switch the code checks) | |
fips | aws_lc_rs, aws-lc-rs?/fips, webpki/aws-lc-rs-fips | |
logging | yes | log |
prefer-post-quantum | yes | aws_lc_rs |
read_buf | rustversion, std | |
ring | dep:ring, webpki/ring | |
std | yes | webpki/std, pki-types/std, once_cell/std |
tls12 | yes | nothing else (a switch the code checks) |
zlib | dep:zlib-rs |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version rustls declares (rust-version), and the release that changed it:
- 0.21.2 (2023-06-14): Rust 1.60
- 0.21.8 (2023-10-24): Rust 1.61
- 0.21.12 (2024-04-26): Rust 1.63
- 0.23.18 (2024-11-22): Rust 1.71
- 0.23.19 (2024-11-27): Rust 1.63
- 0.23.20 (2024-12-11): Rust 1.71
- 0.24.0-dev.0 (2026-01-28): Rust 1.83
- 0.23.37 (2026-02-24): Rust 1.71
- 0.24.0-dev.1 (2026-07-23): Rust 1.85
- 0.23.43 (2026-07-29): Rust 1.71
- 0.24.0-dev.2 (2026-10-14): Rust 1.85
- 0.23.46 (2026-10-14): Rust 1.71
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p rustls --precise <version>, or use resolver 3, which picks compatible versions for you.
More on rustls
Real downloads, dependents and alternatives: rustls crate data (2.8M real downloads a day, 5,286 dependents).
Security record: rustls advisories.
docs.rs feature list · crates.io · license Apache-2.0 OR ISC OR MIT · edition 2021
Up next
Before you depend on itrustls crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?