nedb_engine/lib.rs
1// SPDX-FileCopyrightText: 2026 INTERCHAINED LLC
2// SPDX-License-Identifier: BUSL-1.1
3// NEDB · © 2026 INTERCHAINED LLC × Eth-Interchained × Vex (Claude Opus 5)
4
5//! NEDB v2 — Content-addressed DAG storage engine.
6//!
7//! Architecture:
8//!
9//! objects/ — content-addressed, encrypted, BLAKE2b-verified nodes (immutable)
10//! indexes/ — id index (file-per-doc) + sorted indexes (BTreeMap, in-memory)
11//! graph/ — typed DAG edges (filesystem entries)
12//! MANIFEST — BLAKE2b Merkle root of all collection HEADs
13//!
14//! Properties:
15//! - Uncorruptable: atomic writes (tmp→rename), hash verification on read
16//! - Parallel: no global lock on writes; each doc has its own index file
17//! - Instant cold start: no AOF replay; rebuild sorted indexes in parallel
18//! - Self-healing: migrate.rs handles v1→v2 on first startup
19//! - Tamper-evident: BLAKE2b chain from MANIFEST → collection heads → nodes
20
21pub mod store;
22pub mod segment;
23pub mod index;
24pub mod graph;
25pub mod migrate;
26pub mod db;
27pub mod exit;
28pub mod nql;
29pub mod pgwire;
30pub mod pgcatalog;
31pub mod sqlselect;
32pub mod sqljoin;
33pub mod sqlplan;
34pub mod sqlpush;
35#[cfg(feature = "cast")]
36pub mod cast;
37pub mod server;
38
39pub use store::{Dek, Node, ObjectStore};
40pub use index::{IdIndex, OrderedValue, SortedIndexes};
41pub use graph::GraphStore;
42pub use db::Db;