Skip to main content

nedb_engine/
lib.rs

1//! NEDB v2 — Content-addressed DAG storage engine.
2//!
3//! Architecture:
4//!
5//!   objects/     — content-addressed, encrypted, BLAKE2b-verified nodes (immutable)
6//!   indexes/     — id index (file-per-doc) + sorted indexes (BTreeMap, in-memory)
7//!   graph/       — typed DAG edges (filesystem entries)
8//!   MANIFEST     — BLAKE2b Merkle root of all collection HEADs
9//!
10//! Properties:
11//!   - Uncorruptable: atomic writes (tmp→rename), hash verification on read
12//!   - Parallel: no global lock on writes; each doc has its own index file
13//!   - Instant cold start: no AOF replay; rebuild sorted indexes in parallel
14//!   - Self-healing: migrate.rs handles v1→v2 on first startup
15//!   - Tamper-evident: BLAKE2b chain from MANIFEST → collection heads → nodes
16
17pub mod store;
18pub mod segment;
19pub mod index;
20pub mod graph;
21pub mod migrate;
22pub mod db;
23pub mod nql;
24pub mod server;
25
26pub use store::{Dek, Node, ObjectStore};
27pub use index::{IdIndex, OrderedValue, SortedIndexes};
28pub use graph::GraphStore;
29pub use db::Db;