Cover place holder

The Rust Programming Language, 2nd Edition

by Steve Klabnik and Carol Nichols
February 2023, 528 pp.
Use coupon code PREORDER to get 25% off!

The Rust Programming Language, 2nd Edition is the official language guide for Rust 2021, and the best way to get started with Rust. The new edition includes a quick-reference section on organizing code with modules, and improved closure examples of captures, the move keyboard, and Fn traits.

From web apps to operating systems, Rust is the safe, fast, reliable programming language used for an expansive variety of applications. Revised and updated by the original authors, the second edition of The Rust Programming Language shows readers how to take full advantage of Rust 2021 features, from installation to creating robust and scalable programs. It begins with the basics, like creating functions and binding variables, then moves on to more advanced concepts, like error handling, refactoring, multithreading, and pattern matching. In addition, readers will find advice on updating older Rust code, the latest compiler error-message improvements, and enhanced explanations and examples throughout.


Author Bio 

Carol Nichols is a member of the Rust Community Team and a former member of the Rust Core Team. Also active in the Ruby community, she was a key organizer of the Steel City Ruby Conference 2012-2014.

Steve Klabnik is the Community Team Leader for the Rust team at Mozilla, in charge of official Rust community documentation, as well as a trusted Rust community advocate. Klabnik is a frequent speaker at conferences and one of the world's most prolific contributors to Rails projects.

Table of contents 

1. Getting Started
2. Programming a Guessing Game
3. Common Programming Concepts
4. Understanding Ownership
5. Using Structs the Structure Related Data
6. Enums and Pattern Matching
7. Managing Growing Projects with Packages, Crates, and Modules
8. Common Collections
9. Error Handling
10. Generic Types, Traits, and Lifetimes
11. Writing Automated Tests
12. An I/O Project
13. Function Language Features
14. More About Cargo and
15. Smart Pointers
16. Fearless Concurrency
17. Object-Oriented Programming Features
18. Patterns and Matching
19. Advanced Features
20. Final Project
App A Keywords
App B Operators and Symbols
App C Derivable Traits
App D Useful Development Tools
App E Editions

The chapters in red are included in this Early Access PDF.


Reviews of the first edition:

"Covers everything you could want to know about the language."
Stack Overflow

"The book . . . provides information on how developers can get started with Rust."
—Tiera Oliver, Embedded Computing Design

"I'd learned @rustlang back in late-2019 and referred [to The Rust Programming Language]. It's written very well, and is still relevant if you want to refer to."
—Trivikram, @trivikram

"A thing of beauty in a world full of dry arcane texts."
—Garrett Mace, @macegr

"My main learning resource."
—Pawel Grzybek, @pawelgrzybek, Software Engineer