HeadlinesBriefing favicon HeadlinesBriefing.com

Prolly: Content-Addressed Ordered Map Library

Hacker News •
×

Prolly publishes the prolly Rust library crate, providing content-addressed prolly tree storage primitives. Users depend on the package as prolly-map, with concise imports: use prolly::{Config, Prolly};. The crate offers an immutable, ordered key-value index over byte keys and byte values, featuring stable content-derived structure for efficient structural sharing, diff, merge, and bulk loading.

At the API boundary, a Tree is a small persistent handle: root: Option<Cid> points at the content-addressed root node, while config: Config records chunking and encoding parameters. Actual nodes live in a pluggable Store. Operations clone and rewrite only affected paths, write new content-addressed nodes, and return a new Tree handle. All storage-backed tree work is implemented by a runtime-neutral, async-first engine.

Prolly provides ordered byte-key lookup with lexicographic ordering, immutable updates, content-addressed nodes with SHA-256 hashing, deterministic content-defined chunking using xxHash64, structural sharing, efficient diff and merge capabilities, lazy range iteration, batch mutation paths, parallel bulk builders, and pluggable storage with memory, SQLite, and optional RocksDB implementations.

Additional features include Merkle-style missing-node planning, snapshot namespace helpers, a transaction-safe Versioned Map facade, a strict Indexed Map coordinator, native async support for PostgreSQL, MySQL, Redis, and others, store-independent proofs, tree statistics, and a deterministic proximity map with approximate nearest-neighbor indexing.