redb is an embedded key-value database in pure Rust.
redb solves the problem of needing a lightweight, self-contained data store for Rust applications without external dependencies. It uses copy-on-write B+trees to store data and provides a zero-copy, thread-safe API modeled on BTreeMap. The database is fully ACID-compliant with support for multi-version concurrency control, allowing concurrent readers and a writer without blocking. Transactions include savepoint and rollback capabilities, and the store is crash-safe by default.
Developers should choose redb for applications requiring an embedded database with strong consistency guarantees and concurrent access patterns. It suits projects that need portability and pure Rust implementation without relying on C libraries. The tool performs competitively with established alternatives like lmdb and rocksdb on individual writes and read operations, though it trades some performance on bulk loading and range reads for simplicity. The project also supports no_std environments with a custom storage backend, making it viable for embedded systems with sufficient atomic operations support.
The file format is stable with a commitment to providing upgrade paths for future changes. Development uses just and rootless podman for reproducible builds with cached artifacts. The project maintains active CI workflows and publishes benchmarks comparing performance against other embedded key-value stores on standard operations.