# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "kvbm-engine"
version = "1.1.0"
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "Distributed coordination primitives for KVBM"

[dependencies]
kvbm-common = { workspace = true }
kvbm-config = { workspace = true }
kvbm-logical = { workspace = true }
kvbm-physical = { workspace = true }
velo = { workspace = true }

# Workspace deps
dynamo-memory = { workspace = true }
anyhow = { workspace = true }
dashmap = { workspace = true }
derive_builder = { workspace = true }
futures = { workspace = true }
parking_lot = { workspace = true }
rmp-serde = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }

# Non-workspace
bytes = "1.10"
crossbeam-queue = "0.3"
oneshot = "0.1.11"

# Optional
cudarc = { workspace = true, optional = true }
aws-sdk-s3 = { version = "1.120.0", optional = true }
aws-config = { version = "1.8.11", optional = true }
rayon = { version = "1", optional = true }
tokio-rayon = { version = "2", optional = true }
chrono = { version = "0.4", optional = true }
async-nats = { workspace = true, optional = true }
flume = { version = "0.11", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
figment = { version = "0.10", features = ["env", "toml"], optional = true }
libc = { version = "0.2", optional = true }
tracing-subscriber = { workspace = true, optional = true }
nvtx = { version = "1.3", optional = true }

[features]
default = ["s3"]
s3 = ["dep:aws-sdk-s3", "dep:aws-config", "dep:rayon", "dep:tokio-rayon", "dep:chrono"]
collectives = ["nccl"]
nccl = ["dep:cudarc"]
testing-nccl = ["collectives"]
nats = ["dep:async-nats", "dep:flume"]
testing = ["kvbm-logical/testing", "kvbm-physical/testing"]
testing-s3 = ["s3", "testing"]
nvtx = ["kvbm-config/nvtx", "dep:nvtx"]
bench = ["dep:clap", "dep:figment", "dep:libc", "dep:tracing-subscriber", "dep:chrono", "testing"]

[[bin]]
name = "bench_engine"
path = "bin/bench_engine.rs"
required-features = ["bench"]

[package.metadata.cargo-machete]
ignored = ["rayon"]
