| ▲ | Ferrokey – embedded B-tree KV store in Rust, WAL crash recovery, zero deps | |
| 1 points by Psudokit 7 hours ago | ||
Built this in one night to actually understand how databases work internally. What's in it: - Fixed 4096-byte pages (matches OS page size) - B-tree with leaf/internal nodes, proper page splits - Write-ahead log — every write is fsync'd to WAL before touching the db file - Crash recovery — replays WAL records with LSN > superblock.applied_lsn on open - CRC32 torn-write detection - Zero runtime dependencies The crash recovery test was the most interesting to write — it simulates a crash by appending WAL records without writing to the db file, then reopening. Code: https://github.com/Pulkit7070/ferrokey https://x.com/PsudoKit/status/2052074630563954713 | ||