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 namespace;
26pub mod relation;
27pub mod root;
28pub mod diff;
29pub mod refs;
30pub mod constitution;
31pub mod cause;
32pub mod branch;
33pub mod merge;
34pub mod conflict;
35pub mod migrate;
36pub mod db;
37pub mod exit;
38pub mod nql;
39pub mod pgwire;
40pub mod pgcatalog;
41pub mod sqlselect;
42pub mod sqljoin;
43pub mod sqlplan;
44pub mod sqlpush;
45#[cfg(feature = "cast")]
46pub mod cast;
47pub mod server;
48
49pub use store::{Dek, Node, ObjectStore};
50pub use index::{IdIndex, OrderedValue, SortedIndexes};
51pub use graph::GraphStore;
52pub use db::Db;