Johannes Franz
Years
2025–
Kind
Storage library
Stack
Rust
io_uring
Links
Source

Ledger

An append-only write-ahead log for Rust services, with group commit and checksummed segments.

Ledger is a write-ahead log library for services that need durability without a database. Writers append records to segment files. A background committer batches pending records and calls fdatasync once per batch, so one flush covers many writers.

Every record carries a CRC32C checksum and a length prefix. On recovery, the log replays the last segment until the first torn or corrupt record, truncates there and continues. The rest of the design follows from one rule: nothing is acknowledged until it is on stable storage.