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