Skip to content
rusthacks.dev
Topic

Architecture

How to carve a growing Rust codebase into crates and modules that a team can still reason about.

Flat illustration for the post “Event Sourcing in Rust With a Small Working Example”, composed around enums.
ArchitectureGuide

Event Sourcing in Rust With a Small Working Example

Event sourcing stores changes as an append-only list of events and derives state by folding them. A small Rust example: events enum, aggregate, command handling, store and replay.

21 min read
Flat illustration for the post “Repository Pattern in Rust and Whether You Need It”, composed around traits.
Databases

Repository Pattern in Rust and Whether You Need It

A repository hides the database behind a trait. See when that helps (testing, swapping stores) and when it only adds indirection, with a concrete trait, an SQLx impl and an in-memory fake.

3 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.