[workspace]
members = [
    "broadcast",
    "codec",
    "coding",
    "collector",
    "conformance/macros",
    "conformance",
    "consensus",
    "cryptography",
    "deployer",
    "macros",
    "math",
    "p2p",
    "resolver",
    "runtime",
    "storage",
    "stream",
    "utils",
    "examples/bridge",
    "examples/chat",
    "examples/estimator",
    "examples/flood",
    "examples/log",
    "examples/sync",
    "examples/reshare",

    # Fuzz builds
    "broadcast/fuzz",
    "codec/fuzz",
    "coding/fuzz",
    "collector/fuzz",
    "consensus/fuzz",
    "cryptography/fuzz",
    "p2p/fuzz",
    "runtime/fuzz",
    "stream/fuzz",
    "storage/fuzz",
    "utils/fuzz"
]
resolver = "2"

[workspace.package]
version = "0.0.64"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://commonware.xyz"

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(full_bench)', 'cfg(generate_conformance_tests)'] }
unused-must-use = "deny"
rust-2018-idioms = "deny"

[workspace.lints.clippy]
missing-const-for-fn = "warn"
use-self = "warn"
redundant-clone = "warn"
option-if-let-else = "warn"
undocumented_unsafe_blocks = "deny"
# This generates false positives for methods that are correct, and the contortions
# to avoid triggering this method make the code worse.
suspicious_op_assign_impl = "allow"

[workspace.dependencies]
anyhow = { version = "1.0.99", default-features = false }
arbitrary = "1.4.1"
async-lock = "3.4.0"
aws-config = "1.8.10"
aws-sdk-ec2 = "1.187.0"
axum = "0.8.1"
blake3 = { version = "1.8.2", default-features = false }
blst = { version = "0.3.13", default-features = false }
bytes = { version = "1.7.1", default-features = false }
cfg-if = "1.0.0"
chacha20poly1305 = { version = "0.10.1", default-features = false }
chrono = "0.4.39"
clap = "4.5.18"
colored = "3.0.0"
commonware-broadcast = { version = "0.0.64", path = "broadcast" }
commonware-codec = { version = "0.0.64", path = "codec", default-features = false }
commonware-coding = { version = "0.0.64", path = "coding" }
commonware-collector = { version = "0.0.64", path = "collector" }
commonware-conformance = { version = "0.0.64", path = "conformance" }
commonware-conformance-macros = { version = "0.0.64", path = "conformance/macros" }
commonware-consensus = { version = "0.0.64", path = "consensus" }
commonware-cryptography = { version = "0.0.64", path = "cryptography", default-features = false }
commonware-deployer = { version = "0.0.64", path = "deployer", default-features = false }
commonware-macros = { version = "0.0.64", path = "macros" }
commonware-math = { version = "0.0.64", path = "math", default-features = false }
commonware-p2p = { version = "0.0.64", path = "p2p" }
commonware-resolver = { version = "0.0.64", path = "resolver" }
commonware-runtime = { version = "0.0.64", path = "runtime" }
commonware-storage = { version = "0.0.64", path = "storage", default-features = false }
commonware-stream = { version = "0.0.64", path = "stream" }
commonware-utils = { version = "0.0.64", path = "utils", default-features = false }
console-subscriber = "0.5.0"
crc32fast = "1.5.0"
criterion = "0.7.0"
crossterm = "0.29.0"
ecdsa = { version = "0.16.9", default-features = false }
ed25519-consensus = { version = "2.1.0", default-features = false }
ed25519-zebra = "4.1.0"
either = "1.13.0"
futures = "0.3.31"
futures-timer = "3.0.3"
futures-util = "0.3.31"
governor = "0.10.2"
hashbrown = { version = "0.16.1", default-features = false, features = ["default-hasher"] }
io-uring = "0.7.4"
libc = "0.2.172"
libfuzzer-sys = "0.4.9"
num-bigint = { version = "0.4.6", default-features = false }
num-integer = "0.1.46"
num-rational = { version = "0.4.2", features = ["num-bigint"] }
num-traits = "0.2.19"
opentelemetry = "0.31.0"
opentelemetry-otlp = "0.31.0"
opentelemetry_sdk = "0.31.0"
p256 = { version = "0.13.2", default-features = false }
paste = "1.0.15"
pin-project = "1.1.10"
proc-macro-crate = "3.4.0"
proc-macro2 = "1.0"
prometheus-client = "0.24.0"
proptest = "1.8.0"
prost = "0.14.1"
prost-build = "0.14.1"
quote = "1.0"
rand = { version = "0.8.5", default-features = false }
rand_chacha = { version = "0.3", default-features = false }
rand_core = "0.6.4"
rand_distr = "0.4.3"
ratatui = "0.29.0"
rayon = { version = "1.10.0", default-features = false }
reed-solomon-simd = "3.1.0"
reqwest = "0.12.12"
rstest = "0.26.1"
serde = "1.0.218"
serde_json = "1.0.122"
serde_yaml = "0.9.34"
sha2 = { version = "0.10.8", default-features = false }
syn = "2.0.0"
sysinfo = "0.37.2"
thiserror = { version = "2.0.12", default-features = false }
tokio = "1.43.0"
toml = "0.9.8"
tracing = "0.1.41"
tracing-opentelemetry = "0.32.0"
tracing-subscriber = "0.3.19"
uuid = "1.15.1"
x25519-dalek = "2.0.1"
zeroize = "1.5.7"
zstd = "0.13.2"

[profile.bench]
# Because we enable overflow checks in "release," we should benchmark with them.
overflow-checks = true

[profile.dev]
# Although overflow checks are enabled by default in "dev", we explicitly
# enable them here for clarity.
overflow-checks = true

[profile.release]
# To guard against unexpected behavior in production, we enable overflow checks in
# "release" although they incur some performance penalty.
overflow-checks = true

[profile.release-with-debug]
inherits = "release"
# Setting debug to true instructs cargo to include debug symbols in the release
# binary (not to disable optimizations).
debug = true

[profile.test]
# Although overflow checks are enabled by default in "test", we explicitly
# enable them here for clarity.
overflow-checks = true
