Skip to content
Tech News
← Back to articles

Prolly: A content-addressed ordered map built on prolly trees

read original more articles
Why This Matters

Prolly introduces a Rust library for content-addressed, immutable ordered maps built on prolly trees, enabling efficient structural sharing, diffing, and merging. Its architecture supports both async and sync operations, making it versatile for various storage backends and applications, including version control systems. This advancement enhances data integrity, efficiency, and scalability for developers managing complex, distributed data structures.

Key Takeaways

Prolly

Prolly publishes the prolly Rust library crate. Users depend on the package as prolly-map , while code imports stay concise: use prolly::{Config, Prolly}; .

The crate provides content-addressed prolly tree storage primitives: an immutable, ordered key-value index over byte keys and byte values, with 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.

points at the content-addressed root node. config: Config records the chunking and encoding parameters used by the tree.

The actual nodes live in a pluggable Store . Operations clone and rewrite only the affected path or subtrees, write new content-addressed nodes, and return a new Tree handle.

All storage-backed tree work is implemented once by a runtime-neutral, async-first engine. AsyncProlly<S: AsyncStore> uses it directly; Prolly<S: Store> drives the same complete operation through an inline ready-only adapter. The synchronous path does not create a runtime, park a thread, or dispatch store calls to Tokio.

Architecture

The same diagram is also rendered as diagram/[email protected] for contexts that prefer raster images.

... continue reading