Rust tutorials
53 articles · page 2 of 3Hand-written tutorials, ordered as a recommended learning path.
- 21 Pin & Unpin Understand Pin, Unpin, and self-referential types in Rust. Learn why Pin exists, when you need it, and how to work with pinned data safely.
- 22 Serde Guide Master Serde in Rust with practical patterns for JSON, custom serialization, field renaming, enums, and error handling in real-world projects.
- 23 Smart Pointers Learn when and how to use Box, Rc, and Arc smart pointers in Rust with practical examples covering heap allocation, shared ownership, and thread safety.
- 24 Unsafe Rust Learn when unsafe Rust is justified, what the five unsafe superpowers are, and how to write unsafe code that maintains Rust's safety guarantees.
- 25 Async/Await Learn async Rust — futures, async/await syntax, the tokio runtime, spawning tasks, channels, and common async patterns.
- 26 Result & Option Handle errors idiomatically in Rust — Result, Option, the ? operator, custom error types, and the thiserror/anyhow ecosystem.
- 27 Ownership & Borrowing Understand Rust's ownership model — move semantics, borrowing, references, lifetimes, and why the borrow checker exists.
- 28 Pattern Matching Master Rust's pattern matching — match expressions, if let, while let, destructuring, guards, and patterns in function parameters.
- 29 Traits & Generics Master Rust traits and generics — defining traits, trait bounds, default methods, trait objects, and generic data structures.
- 30 Actix vs Axum A side-by-side comparison of Actix Web and Axum, covering architecture, ergonomics, performance, ecosystem, and how to pick the right one for your project.
- 31 async/await How Rust's async/await desugars into a state machine, what a Future actually is, and the runtime model that makes it efficient on real workloads.
- 32 Axum Tutorial A practical introduction to building HTTP services in Rust using the Axum web framework, with routing, extractors, state, and JSON handling.
- 33 Builder Pattern Learn the builder pattern in Rust, why it fits the language so well, and how to use it for ergonomic, type-safe configuration of complex structs.
- 34 Workspaces Organize multi-crate Rust projects with Cargo workspaces: shared dependencies, internal crates, build performance tips, and publishing workflows.
- 35 Rust Channels A practical tour of Rust's std::sync::mpsc channels: senders, receivers, backpressure, and patterns for safe message passing between threads.
- 36 Deref/AsRef Demystify Rust's Deref, DerefMut, and AsRef traits with clear examples showing how smart pointers, coercions, and flexible APIs really work.
- 37 Clippy and Fmt How to use Clippy and rustfmt effectively in Rust projects, including configuration, CI integration, and tips to make linting friction-free.
- 38 Error Conversion How Rust's From trait powers the question-mark operator and lets you compose error types cleanly across libraries, applications, and async code.
- 39 Result How idiomatic Rust handles errors with Result and the ? operator: propagation, conversion, custom error types, and when to use anyhow or thiserror.
- 40 Lifetimes Lifetimes are how Rust tracks how long references live. This deep dive covers annotations, elision rules, generic lifetimes, and the common error patterns.