The Rust Programming Language, 2nd Edition
- 10h 1m
- Carol Nichols, Steve Klabnik
- No Starch Press
- 2023
The Rust Programming Language, 2nd Edition is the official guide to Rust 2021: an open source systems programming language that will help you write faster, more reliable software. Rust provides control of low-level details along with high-level ergonomics, allowing you to improve productivity and eliminate the hassle traditionally associated with low-level languages.
Klabnik and Nichols, alumni of the Rust Core Team, share their knowledge to help you get the most out of Rust’s features so that you can create robust and scalable programs. You’ll begin with basics like creating functions, choosing data types, and binding variables, then move on to more advanced concepts, such as:
- Ownership and borrowing, lifetimes, generics, traits, and trait objects to communicate your program’s constraints to the compiler
- Smart pointers and multithreading, and how ownership interacts with them to enable fearless concurrency
- How to use Cargo, Rust’s built-in package manager, to build, document your code, and manage dependencies
- The best ways to test, handle errors, refactor, and take advantage of expressive pattern matching
In addition to the countless code examples, you’ll find three chapters dedicated to building complete projects: a number-guessing game, a Rust implementation of a command line tool, and a multithreaded server.
About the Author
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.
In this Book
-
Foreword
-
Introduction
-
Getting Started
-
Programming a Guessing Game
-
Common Programming Concepts
-
Understanding Ownership
-
Using Structs to Structure Related Data
-
Enums and Pattern Matching
-
Managing Growing Projects with Packages, Crates, and Modules
-
Common Collections
-
Error Handling
-
Generic Types, Traits, and Lifetimes
-
Writing Automated Tests
-
An I/O Project: Building a Command Line Program
-
Functional Language Features: Iterators and Closures
-
More About Cargo and Crates.io
-
Smart Pointers
-
Fearless Concurrency
-
Object-Oriented Programming Features
-
Patterns and Matching
-
Advanced Features
-
Final Project: Building a Multithreaded Web Server