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 index;
19pub mod graph;
20pub mod migrate;
21pub mod db;
22pub mod nql;
23pub mod server;
24
25pub use store::{Dek, Node, ObjectStore};
26pub use index::{IdIndex, OrderedValue, SortedIndexes};
27pub use graph::GraphStore;
28pub use db::Db;