Event-sourcing primitives in Rust. A thin, opinionated layer on top of
cqrs-es plus a SQLite-backed event store.
crates/sqlite-es— SQLite implementation ofcqrs-es's event repository, view repository, andCqrsFrameworkglue. Standalone — usable wherever you'd plug in acqrs-esbackend.crates/event-sorcery— higher-level ergonomics on top ofsqlite-es: theEventSourcedtrait,Lifecycleadapter, typedStore, projections, schema registry, reactor.
event-sorcery is the recommended entry point. Use sqlite-es directly only if
you need lower-level control.
Extracted from internal services (st0x.issuance and st0x.liquidity) and made standalone so they can share the implementation. External users are welcome but the API surface is still in flux.
Runnable end-to-end examples live under examples/ — one directory
per concept (basic_entity, projection, reactor), each with its own README
explaining what it covers. Run any of them with
cargo run -p event-sorcery --example <name>.
docs/domain.md— domain terminology and naming conventions.docs/cqrs.md— event-sourcing patterns, theEventSourcedtrait, projections, services, schema registry.docs/sqlx.md—SQLX_OFFLINE,query!vs runtime queries, regenerating the query cache.docs/ttdd.md— type-driven TDD methodology used in this project.
nix develop # rust toolchain + sqlx-cli + cargo-nextest
cargo check --workspace
cargo nextest run --workspaceSee AGENTS.md for contribution conventions.
MIT — see LICENSE.