Cargo Features

[dependencies]
rustls = { version = "0.23.23", default-features = false, features = ["aws-lc-rs", "std", "aws_lc_rs", "brotli", "custom-provider", "fips", "logging", "prefer-post-quantum", "read_buf", "ring", "tls12", "zlib", "hashbrown"] }
default = aws_lc_rs, logging, std, tls12

These default features are set whenever rustls is added without default-features = false somewhere in the dependency tree.

aws-lc-rs = aws_lc_rs

Alias because Cargo features commonly use -

std default brotli? read_buf?

Enables std of once_cell, rustls-pki-types, and rustls-webpki

once_cell:

only required for no-std

Affects compress::CompressionCacheInner, ticketer::TicketRotator, time_provider::DefaultTimeProvider, rustls::ticketer

aws_lc_rs default aws-lc-rs? fips? prefer-post-quantum?

Enables aws-lc-rs, aws_lc_rs of rustls-webpki

Affects crypto::aws_lc_rs, crypto::default_fips_provider

brotli = std

Enables brotli and brotli-decompressor

custom-provider
fips = aws_lc_rs

Enables fips of optional aws-lc-rs

aws-lc-rs:

require FIPS

Affects crypto::default_fips_provider

logging default = log
prefer-post-quantum = aws_lc_rs
read_buf = rustversion, std
ring

Enables ring, ring of rustls-webpki

Affects crypto::ring

tls12 default

Affects client_conn::ClientConfig.require_ems, crypto::tls12, server_conn::ServerConfig.require_ems, versions::TLS12

zlib

Enables zlib-rs

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

hashbrown implicit feature

Enables hashbrown

hashbrown:

A Rust port of Google's SwissTable hash map

Affects rustls::ticketer

log logging
rustversion build read_buf?