- Rust 100%
| .cargo | ||
| .devcontainer | ||
| adr | ||
| eve | ||
| eve_broker_inproc | ||
| eve_broker_nats | ||
| eve_db_mongo | ||
| eve_db_sqlite | ||
| eve_e2e | ||
| eve_gateway_http | ||
| eve_storage_fs | ||
| eve_storage_s3 | ||
| eve_tsdb_clickhouse | ||
| eve_tsdb_parquet | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| compose.yaml | ||
| dprint.json | ||
| nats.conf | ||
| README.md | ||
| rustfmt.toml | ||
Eve RS
An event-driven CQRS framework for assembling services from focused building blocks.
Status: 0.1.0. The core (
eve), the test suite (eve_e2e) and the NATS broker, MongoDB, SQLite database, in-process broker, ClickHouse, Parquet, S3, filesystem and HTTP adapters are implemented and tested, including the system units, the backup and its migrations. The broker and the HTTP facade carry raw byte data as well as JSON (adr/core/raw.md). The SQLite database, the in-process fjall broker, the Parquet time-series store and the filesystem storage are the single-node profile (adr/adapter/sqlite.md, adr/adapter/inproc_broker.md, adr/adapter/parquet.md, adr/adapter/storage_fs.md). The decisions live in adr/.
What It Is
eve is a framework for assembling services from focused building blocks. A
service exposes request-response operations over a broker and an HTTP facade,
writes through an event log, and serves reads from materialized projections.
Infrastructure is described by the domain schemas, so storage collections,
time-series tables and streams are provisioned from the same definitions that
validate the data.
eve-rs keeps that operational model: the same lifecycle, dependency
resolution, provisioning and readiness semantics, adapted to Rust's ownership
model.
Non-Goals for 0.1.0
- Byte-level wire compatibility with another
evedeployment beyond the documented contract. The shared formats are fixed in adr/entity/wire.md, which also unifies the schema hash so a mixed deployment provisions consistently; everything else is a transport-adapter concern.
Layout
adr/— architecture decision records, the source of truth for the design; adr/README.md is the index;- a Cargo workspace with the packages at the root:
eve(core), the backend adapters (eve_broker_nats,eve_broker_inproc,eve_db_mongo,eve_db_sqlite,eve_tsdb_clickhouse,eve_tsdb_parquet,eve_storage_s3,eve_storage_fs,eve_gateway_http) andeve_e2e(the test suite and benchmarks). See adr/repo/package.md, adr/adapter/sqlite.md, adr/adapter/inproc_broker.md, adr/adapter/parquet.md and adr/adapter/storage_fs.md.
Tests
Every unit test is inline in the package that owns the code; every integration
test lives in eve_e2e. The standard ports are NATS, MongoDB, ClickHouse and
S3; a test that needs another port says so explicitly. Each bootstrap wipes the
environment and the suite runs one test at a time (RUST_TEST_THREADS = 1 in
.cargo/config.toml), because the backends are shared. See
adr/repo/test.md.
cargo test --workspace # the inline unit tests
docker compose up -d nats mongo clickhouse silo # the backends
NATS_URL=nats://127.0.0.1:4222 \
MONGO_URL='mongodb://root:root1234@127.0.0.1:27017/?authSource=admin' \
CLICKHOUSE_URL=http://root:root1234@127.0.0.1:8123 \
S3_URL=http://root:root1234@127.0.0.1:9002/eve \
cargo test -p eve_e2e
The E2eApp-based tests require all four *_URL variables and fail fast when
one is missing. The adapter isolation tests skip when their backend variable is
unset; the in-process ones need no service and run against temporary
directories. The local groups are:
cargo test -p eve_e2e --test broker --test db --test tsdb --test storage --test app
From the host Silo is reachable at http://127.0.0.1:9002, so S3_URL is
http://root:root1234@127.0.0.1:9002/eve. .devcontainer/devcontainer.json
uses the same compose.yaml, so a dev container has the backends reachable by
their service names.
Benchmarks
The benchmarks live in eve_e2e next to the tests and measure the real
adapters. The network adapters need the backends up; the in-process benchmark
uses temporary files and no service. The setup runs outside the measured region,
so only the operation is measured. A benchmark whose *_URL variable is unset
is skipped. See adr/repo/bench.md.
docker compose up -d nats mongo
NATS_URL=nats://127.0.0.1:4222 MONGO_URL='mongodb://root:root1234@127.0.0.1:27017/?authSource=admin' cargo bench -p eve_e2e
The nine subjects (backup, broker, db, entity, entity_inproc, task,
stream, storage, tsdb) are modules of one bench target, so a single
subject is selected with a criterion filter:
NATS_URL=nats://127.0.0.1:4222 MONGO_URL='mongodb://root:root1234@127.0.0.1:27017/?authSource=admin' cargo bench -p eve_e2e -- entity
The same filter also runs the in-process variant, and -- inproc selects only
it. The tsdb subject needs NATS_URL and CLICKHOUSE_URL for its network
half (NATS + ClickHouse) and runs its Parquet / in-process half without a
service:
docker compose up -d nats clickhouse
NATS_URL=nats://127.0.0.1:4222 \
CLICKHOUSE_URL=http://root:root1234@127.0.0.1:8123 \
cargo bench -p eve_e2e -- tsdb
Regression detection uses the criterion baselines:
cargo bench -p eve_e2e -- --save-baseline main
cargo bench -p eve_e2e -- --baseline main
Reading Order
The full index and the recommended reading order are in adr/README.md. The records are grouped by subject: the core (adr/core/engine.md, adr/core/usage.md, adr/core/unit.md, adr/core/registry.md, adr/core/ports.md, adr/core/provision.md, adr/core/raw.md, adr/core/broker.md), the entity (adr/entity/entity.md, adr/entity/op.md, adr/entity/joint.md, adr/entity/schema.md, adr/entity/query.md, adr/entity/wire.md, adr/entity/status.md), the system (adr/system/system.md, adr/system/task.md, adr/system/backup.md, adr/system/stream.md), the adapter (adr/adapter/nats.md, adr/adapter/inproc_broker.md, adr/adapter/sqlite.md, adr/adapter/parquet.md, adr/adapter/storage_fs.md) and the repo (adr/repo/package.md, adr/repo/log.md, adr/repo/code_style.md, adr/repo/git.md, adr/repo/test.md, adr/repo/bench.md).