How woqwoq/bitcask works
Bitcask is an embedded, append-only key-value store. Its public database interface opens an instance and exposes reads, writes, removals, key enumeration, syncing, and merging; the sample CLI exercises open and repeated writes. Datafiles hold records, while the key directory and hint files support lookup and recovery. The engine is the central orchestration layer. The README is empty, and sampled engine excerpts are partial, so some likely runtime links are shown as unverified rather than asserted.
Main entry points: engine.rs Bitcask engine · record.rs Record encoding · keydir.rs Key directory · main.rs Sample CLI
Components 10
API and entrypoints
- Sample CLI
src/main.rs - Database API
src/db.rs
Database engine
- Bitcask engine
src/engine.rs - Engine options
src/options.rs - Error types
src/error.rs
Storage components
- Record encoding
src/record.rs - Datafiles
src/datafile.rs - Key directory
src/keydir.rs - Hint files
src/hint.rs
Other components
- Database caller
Connections 13
- Database caller → Database API: uses
- Database caller → Sample CLI: runs
- Sample CLI → Bitcask engine: opens and writes
src/main.rs - Database API → Bitcask engine: opens
src/db.rs - Bitcask engine → Engine options: configures from
src/engine.rs - Bitcask engine → Record encoding: uses
src/engine.rs - Bitcask engine → Hint files: uses
src/engine.rs - Bitcask engine → Datafiles: uses
- Bitcask engine → Key directory: indexes through
- Datafiles → Key directory: replays into
src/datafile.rs - Hint files → Key directory: loads into
src/hint.rs - Record encoding → Engine options: uses sizes
src/record.rs - Record encoding → Error types: reports
src/record.rs