batpak
Sync-first event sourcing for Rust: append-only log, causal metadata, policy gates, projections, subscriptions, and typestate-friendly workflows without an async runtime.
Start In 5 Minutes
If you just want the crate:
use *;
let config = new
.with_sync_every_n_events
.with_sync_mode;
let store = open?;
let coord = new?;
let kind = custom;
let receipt = store.append?;
println!;
# Ok::
Pick Your Lane
- User lane:
cargo build,cargo test,cargo run --example quickstart - Maintainer lane:
cargo xtask doctor,cargo xtask ci - Perf lane:
cargo xtask bench --surface neutral|redb|lmdb [--save|--compare]
What You Get
- Append-only segment store with CRC32 integrity
- Optional Blake3 hash chains
- Causal metadata and region queries
- Gate / receipt workflow for policy enforcement
- Event-sourced projections with optional
redborlmdbcaches - Push subscriptions, pull cursors, typestate helpers
- Query/read operations yield
StoredEvent<serde_json::Value>at the storage boundary
Docs
Features
blake3(default): hash-chain verificationredb: redb-backed projection cachelmdb: LMDB-backed projection cachetest-support: explicit test-only runtime hooks
Canonical Commands
just remains available as shorthand, but cargo xtask is the canonical command surface.
License
MIT OR Apache-2.0