1[package]
2name = "rustls"
3version = "0.23.26"
4edition = "2021"
5rust-version = "1.71"
6license = "Apache-2.0 OR ISC OR MIT"
7readme = "../README.md"
8description = "Rustls is a modern TLS library written in Rust."
9homepage = "https://github.com/rustls/rustls"
10repository = "https://github.com/rustls/rustls"
11categories = ["network-programming", "cryptography"]
12autobenches = false
13autotests = false
14exclude = ["src/testdata", "tests/**"]
15build = "build.rs"
16
17[features]
18default = ["aws_lc_rs", "logging", "std", "tls12"]
19
20aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-`
21aws_lc_rs = ["dep:aws-lc-rs", "webpki/aws-lc-rs", "aws-lc-rs/aws-lc-sys", "aws-lc-rs/prebuilt-nasm"]
22brotli = ["dep:brotli", "dep:brotli-decompressor", "std"]
23custom-provider = []
24fips = ["aws_lc_rs", "aws-lc-rs?/fips", "webpki/aws-lc-rs-fips"]
25logging = ["log"]
26prefer-post-quantum = ["aws_lc_rs"]
27read_buf = ["rustversion", "std"]
28ring = ["dep:ring", "webpki/ring"]
29std = ["webpki/std", "pki-types/std", "once_cell/std"]
30tls12 = []
31zlib = ["dep:zlib-rs"]
32
33[build-dependencies]
34rustversion = { version = "1.0.6", optional = true }
35
36[dependencies]
37aws-lc-rs = { workspace = true, optional = true }
38brotli = { workspace = true, optional = true }
39brotli-decompressor = { workspace = true, optional = true }
40hashbrown = { workspace = true, optional = true }
41log = { workspace = true, optional = true }
42# only required for no-std
43once_cell = { workspace = true }
44ring = { workspace = true, optional = true }
45subtle = { workspace = true }
46webpki = { workspace = true }
47pki-types = { workspace = true }
48zeroize = { workspace = true }
49zlib-rs = { workspace = true, optional = true }
50
51[dev-dependencies]
52base64 = { workspace = true }
53bencher = { workspace = true }
54env_logger = { workspace = true }
55hex = { workspace = true }
56log = { workspace = true }
57macro_rules_attribute = { workspace = true }
58num-bigint = { workspace = true }
59rcgen = { workspace = true }
60serde = { workspace = true }
61serde_json = { workspace = true }
62time = { workspace = true }
63webpki-roots = { workspace = true }
64x509-parser = { workspace = true }
65
66[[bench]]
67name = "benchmarks"
68path = "benches/benchmarks.rs"
69harness = false
70required-features = ["ring"]
71
72[[example]]
73name = "test_ca"
74path = "examples/internal/test_ca.rs"
75
76[[test]]
77name = "api"
78path = "tests/runners/api.rs"
79
80[[test]]
81name = "api_ffdhe"
82path = "tests/runners/api_ffdhe.rs"
83required-features = ["tls12"]
84
85[[test]]
86name = "bogo"
87path = "tests/bogo.rs"
88
89[[test]]
90name = "client_cert_verifier"
91path = "tests/runners/client_cert_verifier.rs"
92
93[[test]]
94name = "ech"
95path = "tests/ech.rs"
96
97[[test]]
98name = "key_log_file_env"
99path = "tests/runners/key_log_file_env.rs"
100
101[[test]]
102name = "process_provider"
103path = "tests/process_provider.rs"
104
105[[test]]
106name = "server_cert_verifier"
107path = "tests/runners/server_cert_verifier.rs"
108
109[[test]]
110name = "unbuffered"
111path = "tests/runners/unbuffered.rs"
112
113[package.metadata.docs.rs]
114# all non-default features except fips (cannot build on docs.rs environment)
115features = ["read_buf", "ring"]
116rustdoc-args = ["--cfg", "docsrs"]
117
118[package.metadata.cargo_check_external_types]
119allowed_external_types = [
120 # ---
121 "rustls_pki_types",
122 "rustls_pki_types::*",
123]
124
125[package.metadata.cargo-semver-checks.lints]
126enum_no_repr_variant_discriminant_changed = "warn"
127
128[lints.rust]
129unexpected_cfgs = { level = "warn", check-cfg = ["cfg(bench)", "cfg(coverage_nightly)", "cfg(read_buf)"] }
130