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

[package]
name = "dynamo-runtime"
readme = "README.md"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Dynamo Runtime Library"

[features]
default = []
integration = []
testing-etcd = [] # Tests that require an active ETCD server
tokio-console = ["dep:console-subscriber", "tokio/tracing"]
compute-validation = [] # Enable validation and timing for compute macros
tcp-low-latency = [] # Enable Linux-specific TCP optimizations (TCP_QUICKACK, SO_BUSY_POLL)

[dependencies]
# Use workspace dependencies where available
anyhow = { workspace = true }
async-nats = { workspace = true }
async-stream = { workspace = true }
async-trait = { workspace = true }
async_zmq = { workspace = true }
axum = { workspace = true }
blake3 = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
dashmap = { workspace = true }
derive_builder = { workspace = true }
derive-getters = { workspace = true }
either = { workspace = true }
etcd-client = { workspace = true }
futures = { workspace = true }
humantime = { workspace = true }
parking_lot = { workspace = true }
prometheus = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
rmp-serde = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
tower = { version = "0.5" }
tower-http = { workspace = true }
tracing = { workspace = true }
hyper = { version = "1.5", features = ["http2", "server"] }
hyper-util = { version = "0.1", features = ["tokio", "server", "server-auto"] }
tracing-subscriber = { workspace = true }
tracing-opentelemetry = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry_sdk = { workspace = true }
opentelemetry-otlp = { workspace = true }
thiserror = { workspace = true }
uuid = { workspace = true }
url = { workspace = true }
validator = { workspace = true }
xxhash-rust = { workspace = true }

arc-swap = { version = "1" }
async-once-cell = { version = "0.5.4" }
bincode = { version = "1" }
console-subscriber = { version = "0.4", optional = true }
educe = { version = "0.6.0" }
figment = { version = "0.10.19", features = ["env", "json", "toml", "test"] }
notify = { version = "6.1", default-features = false, features = ["macos_fsevent"] }
inotify = { version = "0.11" }
libc = { version = "0.2" }
local-ip-address = { version = "0.6.3" }
log = { version = "0.4" }
nid = { version = "3.0.0", features = ["serde"] }
nix = { version = "0.29", features = ["signal"] }
nuid = { version = "0.5" }
once_cell = { version = "1" }
percent-encoding = { version = "2.3.2" } # also used by tonic, reqwest, axum, etc
rayon = { version = "1.10" }
regex = { version = "1" }
socket2 = { version = "0.5.8" }
tokio-rayon = { version = "2.1" }

# Kubernetes discovery backend
kube = { version = "2.0.1", default-features = false, features = ["runtime", "derive", "client", "rustls-tls", "aws-lc-rs"] }
k8s-openapi = { version = "0.26.0", features = ["v1_32"] }

[dev-dependencies]
assert_matches = { version = "1.5.0" }
criterion = { version = "0.5", features = ["async_tokio"] }
env_logger = { version = "0.11" }
rstest = { version = "0.23.0" }
temp-env = { version = "0.3.6" , features=["async_closure"] }
stdio-override = {version= "0.2.0"}
jsonschema = {version = "0.17"}
tempfile = { workspace = true }

[[bench]]
name = "compute_pool_overhead"
harness = false

[[bench]]
name = "tcp_codec_perf"
harness = false
