[package] name = "noq-proto" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true repository.workspace = true description = "State machine for the QUIC transport protocol" keywords.workspace = true categories.workspace = true workspace = ".." [features] # NOTE: Please keep this in sync with the feature list in `.github/workflows/codecov.yml`, see # comment in that file for more information. default = ["rustls", "ring", "tracing-log", "bloom"] arbitrary = ["dep:arbitrary"] # Enables conveniences like `EndpointConfig::default`, and together with # enabling the `rustls` feature, this also enables the `aws-lc-rs` crypto provider # for the rustls TLS backend, making `Endpoint::client` and `Endpoint::server` available, # except when compiling to Wasm. # If both `aws-lc-rs` and `ring` are enabled, `ring` will actually be used. aws-lc-rs = ["dep:aws-lc-rs", "aws-lc-rs?/aws-lc-sys", "aws-lc-rs?/prebuilt-nasm", "rustls?/aws-lc-rs"] # TODO: Once released, we'll want to depend on the rustls-aws-lc-rs crate instead of rustls' aws-lc-rs feature. aws-lc-rs-fips = ["aws-lc-rs", "aws-lc-rs?/fips"] # Enables conveniences like `EndpointConfig::default`, and together with # enabling the `rustls` feature, this also enables the `ring` crypto provider # for the rustls TLS backend, making `Endpoint::client` and `Endpoint::server` available, # except when compiling to Wasm. # If both `aws-lc-rs` and `ring` are enabled, `ring` will actually be used. ring = ["dep:ring", "rustls?/ring"] # TODO: Once released, we'll want to depend on the rustls-ring crate instead of rustls' ring feature. # Enables BloomTokenLog, and uses it by default bloom = ["dep:fastbloom"] # Enables rustls as the TLS implementation backend rustls = ["dep:rustls", "dep:aes-gcm"] # Provides `ClientConfig::with_platform_verifier()` convenience method platform-verifier = ["dep:rustls-platform-verifier"] # Configure `tracing` to log events via `log` if no `tracing` subscriber exists. tracing-log = ["tracing/log"] # Enable rustls logging rustls-log = ["rustls?/logging"] # Enable qlog support qlog = ["dep:qlog"] bench = ["dep:criterion"] # Backwards-compatibility features rustls-ring = ["rustls", "ring"] rustls-aws-lc-rs = ["rustls", "aws-lc-rs"] # Internal (PRIVATE!) features used to aid testing. # Don't rely on these whatsoever. They may disappear at any time. __rustls-post-quantum-test = [] __all_without_fips = ["arbitrary", "aws-lc-rs", "rustls", "ring", "platform-verifier", "rustls-log", "qlog", "bench", "bloom", "tracing-log"] [dependencies] aes-gcm = { workspace = true, optional = true } arbitrary = { workspace = true, optional = true } aws-lc-rs = { workspace = true, optional = true } bytes = { workspace = true } criterion = { workspace = true, optional = true } derive_more = { workspace = true } enum-assoc = { workspace = true } fastbloom = { workspace = true, optional = true } identity-hash = { workspace = true } lru-slab = { workspace = true } qlog = { workspace = true, optional = true } rand = { workspace = true } rand_pcg = "0.10" ring = { workspace = true, optional = true } rustc-hash = { workspace = true } rustls = { workspace = true, optional = true } rustls-platform-verifier = { workspace = true, optional = true } slab = { workspace = true } sorted-index-buffer = { workspace = true } thiserror = { workspace = true } tinyvec = { workspace = true, features = ["alloc"] } tracing = { workspace = true } # Feature flags & dependencies for wasm # wasm-bindgen is assumed for a wasm*-*-unknown target [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] ring = { workspace = true, optional = true, features = ["wasm32_unknown_unknown_js"] } getrandom = { workspace = true, features = ["wasm_js"] } rustls-pki-types = { workspace = true, features = ["web"] } # only added as dependency to enforce the `web` feature for this target web-time = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } hex-literal = { workspace = true } proptest = { workspace = true } rcgen = { workspace = true } test-strategy = { workspace = true } testresult = "0.4.1" tracing-subscriber = { workspace = true } wasm-bindgen-test = { workspace = true } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies] # ensure we set the wasm_js feature even for the older version of getrandom used in proptest in Wasm getrandom_0_3 = { package = "getrandom", version = "0.3", features = ["wasm_js"] } [[bench]] name = "send_buffer" harness = false required-features = ["bench"] [lints] workspace = true [package.metadata.docs.rs] # all non-default features except fips (cannot build on docs.rs environment) features = ["__all_without_fips"] [package.metadata.cargo_check_external_types] allowed_external_types = [ "arbitrary::Arbitrary", # gated behind `arbitrary` feature "criterion::Criterion", # gated behind `bench` feature "bytes::*", "rustls", "rustls::*", "rustls_pki_types::*", ]