Skip to content
CAI
Software that uses CAICheck a score

get-eventually/eventually-rs

63.9

Adequate · 9 November 2026

2.7k

lines of production code

Rust

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Rust-based framework for building event-sourced applications, providing core abstractions for domain modeling, command handling, and message serialization. It includes a PostgreSQL-backed persistence layer for storing events and aggregate states, along with procedural macros to simplify aggregate root definitions. The project also provides example applications, such as a bank accounting system and a light switch, to demonstrate the framework's capabilities.

How it got here

2019 — Initial project scaffolding and core abstractions

5 changes.

This period established the foundational structure of the Rust project, introducing configuration files, a multi-crate workspace, and key domain abstractions for event sourcing and command handling. The work focused on setting up the development environment, defining core traits like Message and Aggregate, and implementing basic infrastructure for serialization, instrumentation, and in-memory testing.

2020–2025 — PostgreSQL persistence and examples

7 changes.

This period focused on implementing PostgreSQL-backed storage for aggregates and events, including database schema migrations and integration tests. The work also expanded the project's example applications to demonstrate event sourcing and CQRS patterns using both in-memory and Postgres-backed implementations.

Features

Add Bank Accounting example application

Introduces a new 'Bank Accounting' example application that demonstrates event sourcing and CQRS patterns. The example includes domain models for bank accounts and transactions, an application service layer handling commands like opening accounts, deposits, and transfers, and a gRPC API for external interaction. It also provides a Postgres-backed event store implementation and serialization logic for converting domain events to/from protobuf messages.

examples/bank-accounting · high confidence

Add PostgreSQL-backed aggregate and event storage

The \eventually-postgres\ crate now provides concrete implementations for persisting aggregates and events in PostgreSQL. The \aggregate::Repository\ struct implements the repository pattern for storing and retrieving aggregate roots, handling serialization, versioning, and conflict detection. Additionally, the \event::Store\ struct implements the event store, supporting appending domain events and streaming events by stream ID and version. Both components automatically run database migrations on initialization.

eventually-postgres/src · high confidence

Add aggregate\_root procedural macro for aggregate types

The \eventually-macros\ crate now includes a new \aggregate\_root\ procedural macro. This macro generates a newtype wrapper around \eventually::aggregate::Root\<T\>\, implementing \Deref\, \DerefMut\, and \From\ conversions. This allows users to define custom aggregate types that can seamlessly interact with the \eventually\ framework's domain command implementation.

eventually-macros · high confidence

Add bank accounting and light switch examples

Users can now explore two new example applications: a 'light switch' demo that shows core functionality without persistence or UI, and a 'bank accounting' application that demonstrates event sourcing with a generic bounded context, including proto definitions, build scripts, and Docker Compose configuration for the required services.

examples · high confidence

Add light switch example demonstrating event-sourced domain model

The examples/light-switch directory now contains a complete, runnable example of a light switch domain model built on an event-sourced architecture. This includes the domain model (LightSwitch aggregate, state management, and events), application services, and command/query handlers for installing, turning on/off, and querying the switch's state. The example demonstrates how to use the 'eventually' framework for building event-sourced applications with in-memory storage.

examples/light-switch · high confidence

Added database schema for event sourcing and aggregates

The PostgreSQL migration files now include the schema for event sourcing and aggregate roots. This introduces two new tables, 'event\_streams' and 'events', to store event data and metadata, along with a stored procedure for upserting event streams. Additionally, a new 'aggregates' table and 'upsert\_aggregate' procedure are added to manage aggregate root states and versions, enabling the storage and versioned updates of aggregate data.

eventually-postgres/migrations · high confidence

Introduce Event Sourcing support for Aggregates

The \eventually\ crate now provides a complete foundation for Event Sourcing. This includes the \Aggregate\ trait to define domain models, the \Root\ struct to manage state and uncommitted events, and a \Repository\ interface with an \EventSourced\ implementation that persists and loads aggregates via an event stream. Additionally, an in-memory \InMemory\ event store is provided for testing and development.

eventually/src/aggregate · high confidence

Introduce command handling infrastructure and test utilities

The \eventually\ crate now includes a new \command\ module that provides the \Handler\ trait for processing domain commands and an \Envelope\ type for wrapping them. This module also introduces a \Scenario\ testing utility that enables writing tests using a given-when-then pattern, allowing developers to verify command handling logic against an in-memory event store.

eventually/src/command · high confidence

Introduce core abstractions for domain messaging, serialization, and instrumentation

The \eventually\ crate now exposes a structured domain messaging system via the \message\ module, which defines the \Message\ trait and the \Envelope\<T\>\ wrapper carrying payload and optional metadata. Serialization is supported through the \serde\ module, providing \Serializer\, \Deserializer\, and \Serde\ traits with concrete implementations for JSON and Protobuf formats. Additionally, the \tracing\ module adds instrumentation wrappers for \AggregateRepository\ and \EventStore\, enabling automatic logging of repository and event store operations.

eventually/src · high confidence

Project setup and configuration files added

Added configuration files for the Rust toolchain and development environment, including .clippy.toml, .editorconfig, .envrc, CONTRIBUTING.md, LICENSE, codecov.yml, flake.lock, flake.nix, renovate.json5, rustfmt.toml, and .gitignore. These changes establish the project's coding standards, build environment, and contribution guidelines.

(repo-wide) · high confidence

Test coverage

Added integration tests for Postgres-backed aggregate repository and event store

Added new integration tests for the \eventually-postgres\ crate, specifically covering the \aggregate::Repository\ and \event::Store\ implementations. These tests use \testcontainers\ to spin up a real PostgreSQL database, verifying that the aggregate repository can correctly save and retrieve aggregates, handle concurrent write conflicts, and that the event store can append events with and without version checks, as well as handle concurrent stream writes.

eventually-postgres/tests · high confidence

Dependencies

Rust dependency updates and multi-crate workspace setup

The project has been restructured into a multi-crate workspace containing the core 'eventually' library, 'eventually-macros', and 'eventually-postgres' backend, along with example applications. This update upgrades several key dependencies to newer versions, including sqlx to 0.8.3, thiserror to 2.0.12, syn to 2.0.100, and tokio to 1.36.0/1.44.1, ensuring compatibility with the latest Rust ecosystem standards.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 61 → 64 (+2.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 45 → 50 (+5.7)
  • Readiness 61 → 61 (+0.0)
  • Security 74 → 74 (+0.0)
  • Domain Modelling 100 → 100 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (2)

  • Inconsistent type usage in test scenarios. eventually.aggregate.test.Scenario.given takes Envelope, while eventually.command.test.Scenario.given takes Persisted. Persisted is a wrapper containing Envelope (plus stream_id/version). This forces test writers to know which domain's test helper they are using and how to construct the input data differently.
  • Semantic ambiguity between record_new and record_that. In Event Sourcing, 'record' usually implies appending to the uncommitted buffer. Having two methods with nearly identical signatures suggests either a split between 'new' vs 'existing' aggregate handling or a confusion between 'appending' vs 'replaying'. Without distinct behavioral differences visible in the signature, this is confusing.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

get-eventually/eventually-rs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8a842d7b6f4bb91ec1de4e47adfcd26fe48502eb — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.