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

[package]
name = "dynamo-kv-router"
description = "KV Router - Radix tree for LLM KV cache routing"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
readme = "README.md"

[features]
default = []
metrics = ["dep:prometheus"]
runtime-protocols = ["dep:dynamo-runtime"]
bench = []
standalone-indexer = ["dep:axum", "dep:bytes", "dep:zeromq", "dep:serde_json", "dep:reqwest"]
indexer-runtime = ["metrics", "runtime-protocols", "standalone-indexer"]

[dependencies]
# repo
dynamo-runtime = { workspace = true, optional = true }
dynamo-tokens = { workspace = true }

# workspace
anyhow = { workspace = true }
async-trait = { workspace = true }
dashmap = { workspace = true }
ordered-float = { workspace = true }
derive_builder = { workspace = true }
derive-getters = { workspace = true }
prometheus = { workspace = true, optional = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true, optional = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
validator = { workspace = true }
xxhash-rust = { workspace = true }

# dependencies
flume = "0.12.0"
parking_lot = { workspace = true }
rmp-serde = { workspace = true }

rustc-hash = "2.1.1"

# standalone-indexer (optional)
axum = { workspace = true, optional = true }
bytes = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true }
zeromq = { version = "0.4.1", optional = true }

[dev-dependencies]
rstest = "0.18.2"
rstest_reuse = "0.7.0"
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt", "macros", "time", "test-util"] }
dynamo-tokens = { workspace = true }
