Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Resources

I wanted to put together the books, articles, repos, and community resources that shaped how I think about the topics in this guide. If you’re looking to go deeper on anything we covered, this is where I’d start.

Books

Design Patterns and Best Practices in Rust by Evan Williams (2025) is a solid walkthrough of idiomatic Rust patterns. It covers GoF patterns adapted for Rust, functional patterns, and architectural patterns you’ll actually use in real projects.

The Rust Spellbook (2026) is packed with hundreds of Rust tips and techniques. It’s great for discovering lesser-known features of the language, the standard library, and the toolchain that you might not stumble on otherwise.

Rust Web Development by yours truly (Manning). This is my earlier book on building web services in Rust, covering Warp and the broader ecosystem. If you want more context on how I think about these problems, that’s a good place to look.

Architecture and design articles

Master Hexagonal Architecture in Rust is, in my experience, the most thorough guide to implementing hexagonal architecture (ports and adapters) in Rust. It walks through domain modeling, trait-based ports, adapter implementations, dependency injection, testing strategies, and the trade-offs you’ll hit along the way. I leaned on this heavily when writing the architecture chapters in this guide.

A Rustacean Clean Architecture Approach to Web Development describes a four-layer architecture (models, persistence, routers, documentation) with a pragmatic take on framework coupling. I think it’s a nice complement to the hexagonal architecture guide, because it shows a simpler approach that works well when your app is mostly CRUD.

Rust, Axum, and Onion Architecture walks through implementing onion architecture with Axum. It covers the presentation, application, domain, and infrastructure layers with concrete code examples you can follow along with.

Building a Clean Rust Backend with Axum, Diesel, PostgreSQL and DDD shows domain-driven design patterns with Axum and Diesel. You’ll find the repository pattern, layered error handling, and custom extractors all in one place.

The Best Way to Structure Rust Web Services covers project organization patterns, from flat modules to workspace-based clean architecture. What I like about it is the practical advice on when to pick each approach.

Axum-specific guides

The Ultimate Guide to Axum (Shuttle) covers a lot of ground: handlers, routing, state management, custom extractors, middleware, testing with oneshot, and deployment. If you want one article that touches all the Axum basics, this is a good pick.

How to Build Production-Ready REST APIs in Rust with Axum takes you through the complete lifecycle of a production API: project setup, error handling, validation, authentication, middleware composition, graceful shutdown, and Docker deployment. It’s a good end-to-end reference.

Building High-Performance APIs with Axum and Rust focuses on performance, which we didn’t dig into much in this guide. It covers benchmarking and optimization strategies specific to Axum.

Error Handling in Axum (LogRocket) goes through the various approaches to error handling in Axum, from simple status code returns to custom error types with IntoResponse. If our error handling chapter left you wanting more options, start here.

Elegant Error Handling with IntoResponse (Leapcell) shows the thiserror plus IntoResponse pattern for centralized error handling. It’s a clean approach that I’ve found works well in practice.

Domain modeling and type-driven design

Using Types to Guarantee Domain Invariants by Luca Palmieri is one of my favorite articles on the newtype pattern and “parse, don’t validate” applied to Rust web applications. If those ideas clicked for you in our earlier chapters, this goes deeper.

Type-Driven Design in Rust and TypeScript compares type-driven approaches across both languages. If you’re coming from TypeScript (and many of us are), this helps bridge the mental models.

Rust Design Patterns is a community-maintained catalog of Rust design patterns, anti-patterns, and idioms. It includes the newtype pattern and plenty of other patterns that come up in web development. I find myself coming back to this one regularly.

Specific topics

Secure Configuration and Secrets Management in Rust covers the secrecy crate, environment variable management, and in-memory secret protection. If you want to go further than what we covered in our configuration chapter, this is a good next step.

How to Add Structured Logging to Rust HTTP APIs (techbuddies) walks through building a complete structured logging pipeline with correlation IDs and JSON output. Very practical, and you can follow along step by step.

Instrument Rust Axum with OpenTelemetry covers the full OpenTelemetry setup for Axum, including trace propagation and exporter configuration. Getting OTel right can be fiddly, so having a complete reference helps.

JWT Authentication in Rust (Shuttle) walks you through implementing JWT authentication with custom extractors, step by step.

Graceful Shutdown for Axum Servers covers signal handling, connection draining, and cleanup patterns. Graceful shutdown is one of those things you don’t think about until you need it, and then you really need it.

Health Checks and Readiness Probes in Rust for Kubernetes covers implementing liveness and readiness probes for container orchestrators. If you’re deploying to Kubernetes, you’ll want these.

Axum Backend Series: Models, Migrations, DTOs and Repository Pattern is a practical walkthrough of setting up the database layer with SQLx. It’s hands-on and gets you to working code quickly.

An Ergonomic Pattern for SQLx Queries in Axum describes the FromRef pattern for clean database access in handlers. Short read, but the pattern it shows is something I use all the time.

Example repositories

rust10x/rust-web-app is a production blueprint for Axum web applications. It’s maintained as a reference implementation and includes things like multi-tenancy support that you won’t find in most example repos.

launchbadge/realworld-axum-sqlx implements the RealWorld spec (a Medium clone API) using Axum and SQLx. I like it because it’s a complete, working example of a non-trivial API, which is hard to find.

JoeyMckenzie/realworld-rust-axum-sqlx is another RealWorld implementation, but with a different architectural approach. Comparing the two side by side is a great way to see how different design decisions play out in practice.

jeremychone-channel/rust-axum-course has the code from a thorough Axum video course. It covers everything from basics to production patterns, and the commit history is nicely structured if you want to follow along.

tokio-rs/axum/examples has over 30 official examples maintained by the Axum team. When I’m unsure how something is supposed to work, this is usually the first place I check. It covers everything from basic routing to WebSockets, testing, and graceful shutdown.

Ecosystem references

Axum ECOSYSTEM.md is the official catalog of over 70 community-maintained crates for Axum. Before you build something yourself, check here first. It covers authentication, middleware, validation, observability, and all sorts of specialized features.

Idiomatic Rust (mre) is a peer-reviewed collection of articles, talks, and repositories that teach concise, idiomatic Rust. It’s a rabbit hole, but a worthwhile one.

Rust API Guidelines has an extensive list of recommendations for designing idiomatic Rust APIs. It’s useful for both your internal module APIs and your public HTTP API, and it’s where I’d point anyone who asks “how should I design this interface?”