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

[workspace]

[package]
name = "kvbm-py3"
version = "1.0.0"
edition = "2024"
authors = ["NVIDIA"]
license = "Apache-2.0"
homepage = "https://github.com/ai-dynamo/dynamo"
repository = "https://github.com/ai-dynamo/dynamo.git"

[lib]
path = "src/lib.rs"
name = "_core"
# "cdylib" is necessary to produce a shared library for Python to import from.
# "rlib" is necessary to support doctests.
crate-type = ["cdylib", "rlib"]

[features]
default = ["block-manager"]
block-manager = ["dynamo-llm/block-manager", "dep:dlpark", "dep:cudarc"]
nccl = ["block-manager", "dynamo-llm/nccl", "cudarc/nccl"]  # Enable NCCL collective operations for replicated mode

[dependencies]
dynamo-llm = { path = "../../llm" }
dynamo-runtime = { path = "../../runtime" }

anyhow = { version = "1" }
derive-getters = "0.5"
serde = { version = "1" }
serde_json = { version = "1.0.138" }
thiserror = { version = "2.0" }
tokio = { version = "1.46.0", features = ["full"] }
tokio-util = { version = "0.7", features = ["rt"] }
tracing = { version = "0"  }
uuid = { version = "1.17", features = ["v4", "serde"] }

# "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so)
# "abi3-py310" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.10
pyo3 = { version = "0.23.4", default-features = false, features = [
  "macros",
  "experimental-async",
  "experimental-inspect",
  "extension-module",
  "py-clone",
  "abi3-py310",
] }

pyo3-async-runtimes = { version = "0.23.0", default-features = false, features = [
  "attributes",
  "testing",
  "tokio-runtime",
  "unstable-streams",
] }

dlpark = { version = "0.5", features = ["pyo3", "half"], optional = true }
cudarc = { version = "=0.19.3", features = ["cuda-version-from-build-system", "fallback-latest"], optional = true }

[dev-dependencies]
