Skip to main content

vsdb_core/
lib.rs

1//! # vsdb_core
2//!
3//! `vsdb_core` provides the low-level building blocks for `vsdb`, including the
4//! RocksDB storage layer, raw data structures, and common utilities. It is not
5//! typically used directly by end-users, but forms the foundation of the `vsdb`
6//! ecosystem.
7
8#![deny(warnings)]
9#![cfg_attr(test, allow(warnings))]
10#![recursion_limit = "512"]
11
12/// Manages the RocksDB storage layer, raw data types, and shared utilities.
13///
14/// This module provides the RocksDB storage layer along with fundamental
15/// types such as `RawKey`, `RawValue`, and environment management functions.
16pub mod common;
17
18/// Contains raw, untyped data structures.
19///
20/// This module provides `MapxRaw`, a basic, high-performance key-value map that
21/// operates on raw bytes. It serves as the foundation for the typed, user-facing
22/// collections in the `vsdb` crate.
23pub mod basic;
24
25/// A raw, high-performance, disk-backed key-value map.
26pub use basic::mapx_raw::MapxRaw;
27
28/// A persistent B+ tree with copy-on-write structural sharing.
29pub use basic::persistent_btree::PersistentBTree;
30
31/// Commonly used items, re-exported for convenience.
32///
33/// This includes data size constants (KB, MB, GB), a null terminator constant (`NULL`),
34/// raw data types (`RawBytes`, `RawKey`, `RawValue`), and functions for managing
35/// the database environment (e.g., `vsdb_flush`, `vsdb_set_base_dir`).
36pub use common::{
37    BatchTrait, GB, KB, MB, NULL, RawBytes, RawKey, RawValue, vsdb_flush,
38    vsdb_get_base_dir, vsdb_get_custom_dir, vsdb_set_base_dir,
39};