Skip to main content

kvbm_engine/
lib.rs

1// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#![doc = include_str!("../docs/architecture.md")]
5
6pub use kvbm_common::{BlockId, LogicalLayoutHandle, SequenceHash};
7pub use velo::{InstanceId, PeerInfo, WorkerAddress};
8
9/// GPU/device tier -- HBM KV cache. Fastest access, smallest capacity.
10/// Blocks here are actively used by attention kernels.
11#[derive(Clone, Copy, Debug)]
12pub struct G1;
13/// CPU/host tier -- pinned DRAM cache. Microsecond-latency staging area
14/// for RDMA transfers and G3/G4 promotion.
15#[derive(Clone, Copy, Debug)]
16pub struct G2;
17/// Disk tier -- NVMe/SSD cache. Millisecond-latency persistent storage
18/// for warm blocks.
19#[derive(Clone, Copy, Debug)]
20pub struct G3;
21/// Object store tier -- S3/MinIO. Highest latency but unlimited capacity
22/// for cold/archival blocks.
23#[derive(Clone, Copy, Debug)]
24pub struct G4;
25
26#[cfg(feature = "collectives")]
27pub mod collectives;
28#[doc = include_str!("../docs/leader.md")]
29pub mod leader;
30#[doc = include_str!("../docs/object.md")]
31pub mod object;
32#[doc = include_str!("../docs/offload.md")]
33pub mod offload;
34pub mod pubsub;
35#[doc = include_str!("../docs/runtime.md")]
36pub mod runtime;
37#[doc = include_str!("../docs/worker.md")]
38pub mod worker;
39
40#[cfg(feature = "testing")]
41pub mod testing;
42
43pub use runtime::{KvbmRuntime, KvbmRuntimeBuilder, RuntimeHandle};