{"slug":"best-embedded-key-value-databases-for-rust-applications","title":"Best embedded key-value databases for Rust applications","question":"What are the best embedded key-value databases for Rust applications in 2026?","verdict":"As of 2026-08-06, ChatGPT, Claude and Gemini collectively rank redb #1 for embedded key-value databases for rust applications on ModelsAgree — unanimous among the 3 models that have answered. The models' case: Best default for most Rust apps: pure Rust, stable format, full ACID durability, typed zero-copy API, MVCC readers, savepoints, and strong performance with little tuning. The models' main caveat: Its single-writer B+tree architecture is not ideal for sustained write-heavy or multi-process workloads. The strongest alternative is RocksDB — Near-tie for first and the stronger choice at very large scale: exceptionally mature, fast under heavy writes, highly tunable, and rich in compaction. Source: https://modelsagree.com/best/best-embedded-key-value-databases-for-rust-applications (modelsagree.com, CC BY 4.0).","category":"Database","url":"https://modelsagree.com/best/best-embedded-key-value-databases-for-rust-applications","updated":"2026-08-06","models":["ChatGPT","Claude","Gemini"],"consensus":"All 3 models rank redb the top pick","disagreement":null,"combined":[{"rank":1,"product":"redb","domain":null,"score":15,"appearances":3,"modelRanks":{"ChatGPT":1,"Claude":1,"Gemini":1},"reason":"Best default for most Rust apps: pure Rust, stable format, full ACID durability, typed zero-copy API, MVCC readers, savepoints, and strong performance with little tuning; narrowly beats RocksDB for typical single-process workloads because integration and operation are much simpler."},{"rank":2,"product":"RocksDB","domain":null,"score":10,"appearances":3,"modelRanks":{"ChatGPT":2,"Claude":2,"Gemini":4},"reason":"Near-tie for first and the stronger choice at very large scale: exceptionally mature, fast under heavy writes, highly tunable, and rich in compaction, compression, column-family, snapshot, batch, and transaction features."},{"rank":3,"product":"LMDB","domain":null,"score":9,"appearances":3,"modelRanks":{"ChatGPT":4,"Claude":3,"Gemini":2},"reason":"High-level, type-safe Rust wrapper around LMDB delivering unmatched zero-copy memory-mapped read performance, sub-millisecond query execution, and decades of proven ACID reliability. Near-tie with redb for read-heavy workloads, assuming maximum read throughput outweighs pure-Rust purity requirements."},{"rank":4,"product":"Fjall","domain":null,"score":8,"appearances":3,"modelRanks":{"ChatGPT":3,"Claude":4,"Gemini":3},"reason":"Best Rust-native LSM option: safe Rust, range and prefix scans, compression, multiple keyspaces, background maintenance, optional value separation, and serializable single-writer or optimistic multi-writer transactions; it can outrank redb for write-heavy datasets."},{"rank":5,"product":"libmdbx","domain":null,"score":1,"appearances":1,"modelRanks":{"Claude":5},"reason":"A hardened LMDB derivative that fixes several LMDB shortcomings (auto-sizing, better durability modes, larger limits) while keeping the fast mmap B-tree reads; proven at scale as the storage core of Reth, so it carries real high-throughput production credibility."},{"rank":6,"product":"SurrealKV","domain":null,"score":1,"appearances":1,"modelRanks":{"ChatGPT":5},"reason":"Strongest specialist choice for versioned data: pure-Rust LSM storage with ACID transactions, MVCC, snapshot isolation, time-travel reads, checkpoint and restore, value separation, and support for datasets larger than memory."}],"perModel":{"ChatGPT":[{"rank":1,"product":"redb","reason":"Best default for most Rust apps: pure Rust, stable format, full ACID durability, typed zero-copy API, MVCC readers, savepoints, and strong performance with little tuning; narrowly beats RocksDB for typical single-process workloads because integration and operation are much simpler.","fix":"Its single-writer B+tree architecture is not ideal for sustained write-heavy or multi-process workloads."},{"rank":2,"product":"RocksDB","reason":"Near-tie for first and the stronger choice at very large scale: exceptionally mature, fast under heavy writes, highly tunable, and rich in compaction, compression, column-family, snapshot, batch, and transaction features.","fix":"C++ build dependencies and substantial tuning and compaction complexity make it excessive for many ordinary Rust applications."},{"rank":3,"product":"Fjall","reason":"Best Rust-native LSM option: safe Rust, range and prefix scans, compression, multiple keyspaces, background maintenance, optional value separation, and serializable single-writer or optimistic multi-writer transactions; it can outrank redb for write-heavy datasets.","fix":"Durable-to-disk commits require an explicit persistence policy, making the default behavior easier to misuse than redb’s crash-safe default."},{"rank":4,"product":"LMDB","reason":"Outstanding for read-heavy workloads: mature ACID copy-on-write storage, zero-copy memory-mapped reads, excellent concurrent-reader performance, multi-process access, and a good typed Rust interface through heed.","fix":"Only one write transaction can proceed at a time, so write-intensive or highly concurrent mutation workloads are a poor fit."},{"rank":5,"product":"SurrealKV","reason":"Strongest specialist choice for versioned data: pure-Rust LSM storage with ACID transactions, MVCC, snapshot isolation, time-travel reads, checkpoint and restore, value separation, and support for datasets larger than memory.","fix":"Its 0.x maturity and SurrealDB-first design make it a riskier general-purpose dependency than the four options above."}],"Claude":[{"rank":1,"product":"redb","reason":"Pure-Rust, single-file embedded store with real ACID transactions, MVCC (concurrent readers with one writer), and a clean typed API; reached a stable 1.0/2.x with a documented on-disk format, zero C/C++ dependencies, and trivial cross-compilation — the safest default for a typical Rust app that wants a copy-of-LMDB-semantics store without FFI. Near-tie with RocksDB at the top; the choice splits on workload (redb wins for read-heavy/embedded simplicity).","fix":"Copy-on-write B-tree is not write-optimized — heavy sustained write/ingest workloads and very large datasets favor an LSM engine; ecosystem of tooling is thinner than RocksDB's."},{"rank":2,"product":"RocksDB","reason":"The most battle-tested engine here — LSM-tree tuned over a decade at Meta scale, excellent for write-heavy and large-than-RAM workloads, with column families, tunable compaction, prefix seeks, and huge production mileage across the industry; the rust-rocksdb bindings are mature and widely deployed.","fix":"It is C++ behind FFI — slow build times, large binary, painful cross-compilation, unsafe boundary, and a notoriously deep tuning surface; not for teams that want pure-Rust simplicity or minimal ops burden."},{"rank":3,"product":"LMDB","reason":"Memory-mapped B+tree delivering the fastest reads in the category with zero-copy access, full ACID, crash-proof by design, and a tiny, extremely stable codebase; heed gives a well-maintained, ergonomic typed Rust wrapper. Ideal for read-dominated, latency-sensitive workloads.","fix":"Single writer serialized globally, a fixed max map size you must pre-size, write amplification and the mmap model make it poor for write-heavy or unbounded-growth data; C dependency remains."},{"rank":4,"product":"Fjall","reason":"Pure-Rust LSM-tree store that fills redb's main gap — write-optimized, partition (column-family-like) support, actively and thoughtfully developed, and a good match for ingest-heavy pure-Rust services that don't want RocksDB's FFI.","fix":"Youngest and least battle-tested of the group with a smaller ecosystem and fewer large-scale production references; format/API stability guarantees are weaker than redb's or RocksDB's."},{"rank":5,"product":"libmdbx","reason":"A hardened LMDB derivative that fixes several LMDB shortcomings (auto-sizing, better durability modes, larger limits) while keeping the fast mmap B-tree reads; proven at scale as the storage core of Reth, so it carries real high-throughput production credibility.","fix":"Still C behind FFI, retains the single-writer model, and has sparse Rust-side documentation and a niche community — for specialists, not for a team wanting an approachable default."}],"Gemini":[{"rank":1,"product":"redb","reason":"Pure Rust ACID-compliant copy-on-write B+tree database offering typed table schemas, MVCC for concurrent readers, zero unsafe code, and zero C FFI build overhead. Earns top rank assuming typical practitioners prioritize memory safety, developer ergonomics, and seamless Rust cross-compilation; near-tie with heed on read utility.","fix":"Copy-on-write B+tree architecture makes write throughput significantly lower than LSM-tree alternatives under heavy append-only write workloads."},{"rank":2,"product":"LMDB","reason":"High-level, type-safe Rust wrapper around LMDB delivering unmatched zero-copy memory-mapped read performance, sub-millisecond query execution, and decades of proven ACID reliability. Near-tie with redb for read-heavy workloads, assuming maximum read throughput outweighs pure-Rust purity requirements.","fix":"Bound to LMDB C-library mechanics, forcing fixed maximum file size pre-allocations, strict single-writer transaction limits, and C FFI dependency boundaries."},{"rank":3,"product":"Fjall","reason":"Modern, pure-Rust LSM-tree storage engine bringing partition keyspaces, customizable compaction strategies, and transactional features to high-write workloads without C++ toolchain friction. Earns its rank on real-world merit as the strongest native Rust alternative for write-heavy pipelines.","fix":"Newer codebase with less multi-year enterprise production battle-testing than legacy storage engines, alongside LSM background compaction I/O overhead under sustained load."},{"rank":4,"product":"RocksDB","reason":"Industry-standard C++ LSM-tree engine accessed via rust-rocksdb bindings, offering unmatched production battle-testing, extensive compaction tuning, block caching, and petabyte-scale write throughput. Assumes project requirements permit C++ FFI in exchange for high-scale performance.","fix":"Heavy C++ build footprint that slows compilation, complicates cross-compilation setups, and risks FFI memory safety failures outside Rust runtime guarantees."}]},"missedByModel":{"ChatGPT":[{"product":"libmdbx","reason":"excellent LMDB evolution, but its Rust binding and support ecosystem are less settled than heed’s"},{"product":"sled","reason":"appealing API, but the current stable release remains beta-era with an unstable format and a long-running rewrite"}],"Claude":[{"product":"sled","reason":"pioneering pure-Rust design and ergonomics, but has languished in perpetual beta with unresolved stability/format concerns, so it can't be recommended for new production use"}],"Gemini":[{"product":"sled","reason":"pioneered pure-Rust lock-free key-value design but suffered from persistent architectural edge-case bugs and eventual unmaintained status"},{"product":"SQLite","reason":"world-class embedded relational database frequently used as a key-value store, but introduces SQL parser overhead and lacks native zero-copy key-value storage abstractions"}]}}