[package]
name = "nexus-stats"
version = "4.0.0"
description = "Fixed-memory, zero-allocation streaming statistics for real-time systems"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true

[features]
default = ["std"]
std = ["alloc", "nexus-stats-core/std", "nexus-stats-smoothing?/std", "nexus-stats-detection?/std", "nexus-stats-regression?/std", "nexus-stats-control?/std"]
alloc = ["nexus-stats-core/alloc", "nexus-stats-smoothing?/alloc", "nexus-stats-detection?/alloc", "nexus-stats-regression?/alloc", "nexus-stats-control?/alloc"]
libm = ["nexus-stats-core/libm", "nexus-stats-detection?/libm", "nexus-stats-regression?/libm", "nexus-stats-control?/libm"]
smoothing = ["dep:nexus-stats-smoothing"]
detection = ["dep:nexus-stats-detection", "smoothing"]
regression = ["dep:nexus-stats-regression"]
control = ["dep:nexus-stats-control"]
full = ["smoothing", "detection", "regression", "control"]

[dependencies]
nexus-stats-core = { version = "1.0.0", path = "../nexus-stats-core", default-features = false }
nexus-stats-smoothing = { version = "1.0.0", path = "../nexus-stats-smoothing", default-features = false, optional = true }
nexus-stats-detection = { version = "1.0.0", path = "../nexus-stats-detection", default-features = false, optional = true }
nexus-stats-regression = { version = "1.0.0", path = "../nexus-stats-regression", default-features = false, optional = true }
nexus-stats-control = { version = "1.0.0", path = "../nexus-stats-control", default-features = false, optional = true }

[[example]]
name = "perf_stats"
required-features = ["std", "full"]

[[example]]
name = "basic"
required-features = ["std"]

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "update_bench"
harness = false
required-features = ["full"]

[lints]
workspace = true
