← All Rust books
beginner fundamentalsofficial

The Rust Programming Language, 2nd Edition

Steve Klabnik, Carol Nichols · No Starch Press · 2023

Best for: Anyone learning Rust for the first time who wants the canonical, always-current explanation of ownership, borrowing, and the rest of the language.

  • ISBN-13: 9781718503106
  • Level: beginner
  • Published: 2023

This is the book most people mean when they say “just read the Rust book.” It’s maintained by the Rust project itself, which gives it a property almost no other programming book has: the print edition and the free online edition at doc.rust-lang.org are the same text, kept in sync with the language as it evolves. When a chapter explains ownership or the borrow checker, you’re reading the explanation the language’s own designers settled on, not a third party’s interpretation of it.

The structure is deliberately gentle. It opens with a guessing-game CLI project to get you writing and running code immediately, then spends sustained time on the concepts that trip up newcomers coming from garbage-collected languages — ownership, borrowing, and lifetimes — before moving into structs, enums, pattern matching, generics, traits, and error handling. Three built-out projects (a multithreaded web server among them) anchor the second half, so the ideas get applied rather than just defined.

Where it’s weaker: because it has to serve as the front door for everyone, it can’t go deep on any one domain — there’s no sustained treatment of concurrency internals, unsafe code, or async, and web/CLI/systems work each get only a light touch. It’s also, by design, cautious about opinions on idiomatic style; it teaches you what compiles, not necessarily what a senior Rust engineer would write.

Compared to Programming Rust: Blandy, Orendorff, and Tindall’s book covers similar early ground but pushes further into systems-level detail (memory layout, FFI, concurrency) in the same volume. This book is the better on-ramp; that one is the better second read once the borrow checker stops feeling adversarial.