Status
Phase 2. This crate now provides file-backed persistence with crash recovery for a single append-only storage file. The API is still pre-1.0 and may change before 1.0.
Track progress and roadmap: https://github.com/jamesgober/emdb-rs
Installation
[]
= "0.3"
Quick Start
use Emdb;
let mut db = open_in_memory;
db.insert?;
assert_eq!;
# Ok::
Persistence
use ;
let path = temp_dir.join;
let reopened = open?;
assert_eq!;
# let _cleanup = remove_file;
# Ok::
Manual compaction:
use Emdb;
let path = temp_dir.join;
let mut db = open?;
db.insert?;
db.compact?;
db.flush?;
# let _cleanup = remove_file;
# Ok::
Features
ttl(default): per-record expiration and default TTL support.nested: dotted-prefix group operations andFocushandles.- persistence (core): append-only file log, replay-on-open, flush policy, and compaction.
TTL Example
#
#
# Ok::
Nested Example
#
#
# Ok::
Goals
- Embedded-first — runs in-process; no separate server, no network.
- High performance — zero-copy reads, allocation-free hot paths, cache-friendly layout.
- Safe — strict
clippyprofile, nounwrapin library code, allunsafedocumented. - Small footprint — minimal dependency graph, fast compile times.
- Portable — Linux, macOS, Windows (x86_64 and ARM64).
Non-Goals
- Client-server operation (use a dedicated DBMS for that).
- A full SQL dialect at this stage.
- Distributed replication at this stage.
Related Projects
emdb is the Rust implementation. Implementations in other languages (Go, C, and others) are planned and will live under their own repositories.
License
Licensed under the Apache License, Version 2.0.
Copyright © 2026 James Gober.