Data Structures
All collections useBTreeMap for deterministic iteration order — no HashMap is used anywhere in the core.
Storage Backends
In-Memory
Graph struct in RAM. Fast, volatile. Used for testing and temporary sessions.Persistent (redb)
ACID transactions, crash-safe. Copy-on-write B-trees with MVCC concurrent readers.
RedbGraph Tables
Query Algorithms
All traversals return an
Artifact containing the path and optional subgraph edges.
Export Formats
Canonical (bit-exact)
- Magic:
b"KREX", version 2 - Checksum: XOR-based deterministic hash
- Import limits: 1M nodes, 10M edges (DoS protection)
- V1 backward compatibility (imports without properties)
JSON
SerializableGraph with serde — nodes, edges, next_node_id, properties.