bitdb is a Bitcask-style key-value store in Rust.
- append-only data files
- in-memory keydir for latest key position
- tombstone delete model
- startup rebuild from data/hint files
- serial merge compaction
- CLI operations + benchmark commands
Use it for simple durable key-value workflows, local testing, storage experiments.
All examples run from repo root.
cargo build
cargo run -- --helpcargo run -- --data-dir ./data put user:1 aliceExpected output:
OK
cargo run -- --data-dir ./data get user:1Expected output when found:
alice
Expected output when missing:
NOT_FOUND
cargo run -- --data-dir ./data delete user:1Expected output:
OK
cargo run -- --data-dir ./data statsExample output:
live_keys=10 tombstones=3
cargo run -- --data-dir ./data mergeExpected output:
OK
Startup benchmark:
cargo run -- --data-dir ./bench-data bench startup --mode serialOutput shape:
startup_ms=...
Merge benchmark:
cargo run -- --data-dir ./bench-data bench merge --mode serialOutput shape:
merge_ms=...
Workload benchmark:
cargo run -- --data-dir ./bench-data bench workload --ops 5000 --mode serial --threads 1Output shape:
ops_per_sec=...
cargo bench --bench engine -- --sample-size 10Baseline serial numbers tracked in BENCHMARK_BASELINE.md.
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-featurescargo test --test record
cargo test --test merge
cargo test cli_put_get_delete_flow -- --exact