Open source Rust event store
FACTSTR
Rust · Memory + PostgreSQL · Query models and projections

A Rust event store

FACTSTR is an open source Rust append-only event store with multiple stores, append and query operations, conditional append based on explicit consistency context, and subscription-based projection updates from future committed batches.

Why this project

One event store. Current stores. Explicit behavior.

The implemented scope is direct: memory and PostgreSQL stores are available now, append, query, and conditional append are implemented, and projections can be updated from future committed batches through subscriptions.

Rust event store with explicit semantics

Append-only storage

Query over committed facts

Conditional append with typed conflict failure

Projection updates from future committed batches

Memory and PostgreSQL stores with one shared behavior model

Store support

Choose the store that fits the current stage of the system.

Available now

Memory Store

Fast in-memory runtime store for local work, tests, and simple integrations.

Available now

PostgreSQL Store

Persistent PostgreSQL-backed store behind the same shared contract.

Planned next areas

Future work

Embedded persistence, durable subscriber cursors, replay, and transport adapters.

Core semantics

Behavior is explicit, not hidden behind a backend.

FACTSTR keeps append, query, conditional append, and subscription behavior explicit. The detailed explanations live in the docs; the site only highlights the current implemented contract.

Global monotonically increasing sequence numbers
Queries return events ordered by ascending global sequence number
Conditional append checks the full conflict context
Subscription notifications happen only after successful commit
One committed append batch is delivered as one subscription batch
Subscription delivery follows committed global sequence order
Failed conditional append emits no subscription batch
Docs

Start with the docs for setup, concepts, subscriptions, and stores.

The docs site is the entry point for concrete usage and behavior details.

Docs Home

Overview of the current implemented scope.

Stores

Current store implementations and how they line up behind one contract.

Workspace

Current crates and support modules.

factstore

Shared runtime contract crate

factstore-memory

Publishable in-memory store

factstore-postgres

Publishable PostgreSQL store

factstore-conformance

Reusable semantic test support

Origin

The current project is Rust. The TypeScript implementation remains useful historical context.

The Rust project is the current implementation. Earlier work with Ralf Westphal explored the same core ideas in a TypeScript event store, including optimistic locking, payload-based querying, real-time subscriptions, and projection-oriented usage.

What carried forward

Context-specific consistency instead of broad aggregate-style locking.
Event filtering and payload-based query semantics as part of the public model.
A strong focus on runtime behavior that stays explicit across store implementations.
Concepts Behind This

Further reading on the ideas behind FACTSTR.