[package]
name = "s2n-quic-core"
version = "0.78.0"
description = "Internal crate used by s2n-quic"
repository = "https://github.com/aws/s2n-quic"
authors = ["AWS s2n"]
edition = "2021"
rust-version = "1.88"
license = "Apache-2.0"
# Exclude corpus files when publishing to crates.io
exclude = ["corpus.tar.gz"]

[features]
default = ["alloc", "std"]
alloc = ["atomic-waker", "bytes", "crossbeam-utils", "s2n-codec/alloc"]
std = ["alloc", "once_cell"]
testing = ["std", "generator", "s2n-codec/testing", "checked-counters", "insta", "futures-test"]
generator = ["bolero-generator"]
checked-counters = []
branch-tracing = ["tracing"]
event-tracing = ["tracing"]
probe-tracing = ["tracing"]
state-tracing = ["tracing"]
# This feature enables support for third party congestion controller implementations
unstable-congestion-controller = []
# This feature enables the use of unstable connection limits
unstable-limits = []
usdt = ["dep:probe"]

[dependencies]
atomic-waker = { version = "1", optional = true }
bolero-generator = { version = "0.13", default-features = false, optional = true }
byteorder = { version = "1", default-features = false }
bytes = { version = "1.7.2", optional = true, default-features = false }
crossbeam-utils = { version = "0.8", optional = true }
cfg-if = "1"
hex-literal = "1.1"
# used for event snapshot testing - needs an internal API so we require a minimum version
insta = { version = ">=1.12", features = ["json"], optional = true }
num-rational = { version = "0.4", default-features = false }
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
pin-project-lite = { version = "0.2" }
probe = { version = "0.5", optional = true }
s2n-codec = { version = "=0.78.0", path = "../../common/s2n-codec", default-features = false }
subtle = { version = "2", default-features = false }
tracing = { version = "0.1", default-features = false, optional = true }
zerocopy = { version = "0.8", features = ["derive"] }
futures-test = { version = "0.3", optional = true } # For testing Waker interactions
once_cell = { version = "1", optional = true }

[dev-dependencies]
bolero = "0.13"
bolero-generator = "0.13"
insta = { version = "1", features = ["json"] }
futures = "0.3"
futures-test = "0.3"
ip_network = "0.4"
plotters = { version = "0.3", default-features = false, features = ["svg_backend", "line_series"] }
s2n-codec = { path = "../../common/s2n-codec", features = ["testing"] }

[target.'cfg(loom)'.dev-dependencies]
loom = { version = "0.7", features = ["checkpoint", "futures"] }

[package.metadata.kani]
flags = { tests = true }
unstable = { stubbing = true }

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
    'cfg(feature, values("thiserror"))',
    'cfg(fuzzing)',
    'cfg(loom)',
    'cfg(kani)',
    'cfg(kani_slow)',
    'cfg(target_pointer_width, values("8", "128"))',
]
