
Migrating a Python or Node Service to Rust Incrementally
Move a Python or Node service to Rust one route at a time: the strangler approach with a proxy, shared contracts, parity tests, data ownership and when to stop.
How to carve a growing Rust codebase into crates and modules that a team can still reason about.

Move a Python or Node service to Rust one route at a time: the strangler approach with a proxy, shared contracts, parity tests, data ownership and when to stop.

Change a type or signature and let rustc list every place that must change. A method for safe large refactors: make the change, follow errors, keep tests green at each step.

Implement undo and redo in Rust with the command pattern: commands as an enum, execute and undo methods, history stacks, merging, and a text editor example.

CQRS splits the model you write to from the model you read from. See the idea in Rust types, where it helps (different read shapes, scale) and where it only adds moving parts.

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.

Choose how a cache learns that data changed: TTL, explicit invalidation on write, versioned keys, events, stale while revalidate, and how to stop stampedes.

Model states as an enum when they change at run time and as types when the order is known at compile time. See both versions of a connection and which one to pick.

Make code that depends on the clock testable: pass the time in, define a Clock trait or closure, use a fake clock that you advance, and pause time in Tokio tests.

Decide what is public on purpose: small surface, private fields, builders, non_exhaustive types and re-exports. Check for accidental breakage with cargo-semver-checks.

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.

Implement soft deletes and audit trails in a Rust app: deleted_at columns, query defaults, partial unique indexes, history tables with triggers and privacy limits.

Design a database schema that matches your Rust types: NOT NULL and Option, enums, newtype ids, timestamps, money as integers and constraints that back up the compiler.
We send one email when a new post is published. No spam.