Skip to content

Rust Handbook

Rust gives you native binary speed and tiny memory footprints without garbage collection pauses or manual memory bugs, and its strict compiler catches entire classes of issues before your code ever runs.

This handbook covers modern Rust from Cargo and the borrow checker through traits, iterators, scoped threads, file I/O, serde, macros, async Tokio, a concurrent CLI tool, and a tested Axum + SQLite web API.

Table of contents

16 chapters
  1. 01Why Rust, installation, and Cargo
  2. 02Variables, types, and control flow
  3. 03Strings, slices, and standard collections
  4. 04Ownership, borrowing, and lifetimes
  5. 05Structs, enums, and pattern matching
  6. 06Error handling with Option, Result, and ?
  7. 07Generics, traits, closures, and iterators
  8. 08Smart pointers, interior mutability, and RAII
  9. 09Threads, channels, and shared-state concurrency
  10. 10Modules, Cargo workspaces, files, and serde
  11. 11Testing, Clippy, macros, and unsafe Rust
  12. 12Async Rust and Tokio
  13. 13Project 1: building urlprobe, an async CLI
  14. 14Project 2: building pulseapi with Axum and SQLite
  15. 15Release builds, cross-compilation, and deployment
  16. 16How I would use Rust

Get the Rust Handbook for free: subscribe to my newsletter and I'll send it your way, together with all my other free programming ebooks.

Want the whole collection? See all my free ebooks.

By subscribing you agree to receive my newsletter (new tutorials, book releases, and courses). You can unsubscribe anytime from the link at the bottom of every email. Your email is the only data collected, stored securely in the EU, and never shared.