Skip to content
rusthacks.dev

Guides

Explore various tutorials from the learning catalog.

The rest of the guides

Web

Actix Web With SQLx and Connection Pools in One Repository

Wire Actix Web 4 to a SQLx 0.9 pool the right way: build the pool once outside the factory closure, share it as web::Data, map errors with ResponseError, and see the 8 versus 28 connection difference when it goes wrong.

16 min read
CLI

Build a Todo CLI in Rust With Serde and a JSON File

Build a todo list CLI in Rust with clap subcommands, serde JSON storage, stable ids, atomic and durable saves, and a file lock that stops concurrent runs from losing items. Every claim measured.

17 min read
CLI

Build a Grep Clone in Rust and Learn File Handling

Build a grep clone in Rust from a naive version that panics on Latin-1 text to a streaming one that searches 72 MB in 77 ms with 2.5 MB of memory, handling binary files, exit codes and broken pipes.

20 min read
Web

Axum Integration Tests With a Real Database in Docker

Test an Axum API against a real Postgres started by Testcontainers: one container per test binary, one migrated database per test, the leaks and version traps that bite, and measured timings for each isolation strategy.

18 min read
WebEditor's pick

An Axum Service You Can Run in Production From Zero

Build a small Axum 0.8 service from an empty crate to something you can deploy: a testable router, one error type, limits and timeouts, tracing, oneshot tests and graceful shutdown on SIGTERM.

17 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.