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