The official book on the Rust programming language, written by the Rust development team at the Mozilla Foundation, fully updated for Rust 2018. The Rust Programming Language is the official book on Rust: an open source systems programming language that helps you write faster, more reliable software. Rust offers control over low-level details (such as memory usage) in combination with high-level ergonomics, eliminating the hassle traditionally associated with low-level languages. The authors of The Rust Programming Language, members of the Rust Core Team, share their knowledge and experience to show you how to take full advantage of Rust's features--from installation to creating robust and scalable programs. You'll begin with basics like creating functions, choosing data types, and binding variables and then move on to more advanced concepts, such as: • Ownership and borrowing, lifetimes, and traits • Using Rust's memory safety guarantees to build fast, safe programs • Testing, error handling, and effective refactoring • Generics, smart pointers, multithreading, trait objects, and advanced pattern matching • Using Cargo, Rust's built-in package manager, to build, test, and document your code and manage dependencies • How best to use Rust's advanced compiler with compiler-led programming techniques You'll find plenty of code examples throughout the book, as well as three chapters dedicated to building complete projects to test your learning: a number guessing game, a Rust implementation of a command line tool, and a multithreaded server. New to this edition: An extended section on Rust macros, an expanded chapter on modules, and appendixes on Rust development tools and editions.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
The official, community-maintained introduction to Rust that takes you from your first `cargo new` to a working multithreaded server, teaching the ownership model that makes Rust's safety guarantees click. Best for programmers coming from another language who want a structured, example-driven path into systems programming.
【Book Arc】
- **Opening (~0%–12%)**: Front matter, foreword, and introduction establish who Rust is for and what the book promises—installation, tooling, and the philosophy of compiler-led learning.
- **Early (~12%–31%)**: Hands-on fundamentals—a guided guessing game, then variables, types, functions, and control flow—so you write runnable code before hitting the hard ideas.
- **Middle (~31%–58%)**: The conceptual core: ownership, structs, enums and `match`, modules and crates, collections, error handling, then generics, traits, and lifetimes. This is where the language's mental model is built.
- **Late (~58%–85%)**: Applied and advanced material—automated tests, a command-line I/O project, iterators and closures, Cargo/crates.io, smart pointers, fearless concurrency, OOP-style patterns, and advanced pattern matching.
- **Ending (~85%–100%)**: Advanced features (macros, unsafe, and more) capped by the final project—a multithreaded web server—plus appendices on keywords, operators, derivable traits, dev tools, and editions.
【Key Takeaways】
- **Ownership is the spine of the book** (Middle): the rules governing moves, borrowing, and drops explain why Rust prevents whole classes of memory bugs without a garbage collector—master this before anything else.
- **The compiler is a teaching partner** (Early): the book deliberately walks you through compiler errors and fixes, framing "fighting the borrow checker" as a learning loop rather than an obstacle.
- **Types carry meaning** (Middle): enums with data, `Option<T>` over null, and custom validation types show how Rust pushes correctness into the type system so invalid states are hard to represent.
- **Error handling is explicit and layered** (Middle): `Result`, `panic!`, and the `?`-style propagation are presented with guidelines for when to recover versus abort, plus custom types for validation.
- **Generics, traits, and lifetimes work together** (Middle): traits define shared behavior, bounds constrain generics, and lifetimes validate references—treated as one connected toolkit, not isolated features.
- **Concurrency without fear** (Late): the ownership model extends to threads and shared state, so data races become compile-time errors rather than runtime surprises.
- **Projects anchor the theory** (Early/Late): three build-along projects—guessing game, CLI tool, multithreaded server—turn abstract chapters into muscle memory.
- **Tooling is first-class** (Late): Cargo for build/test/doc/dependencies, plus appendices on dev tools and editions, make the workflow part of the curriculum.
【Reading Tips】
- **Don't skip Chapter 4 (Ownership)**—slow down there; everything later assumes it. Re-read if borrow-checker errors feel mysterious.
- **Type the code, don't just read it.** The examples and three projects are designed to be compiled; the compiler feedback is the actual lesson.
- **Skim the front matter and appendices** on a first pass, then return to Appendix D (tools) and E (editions) when setting up a real project.
- **Treat generics/traits/lifetimes (Ch. 10) as a checkpoint**—if it's shaky, pause before smart pointers and concurrency, which build on it.
- **Use the CLI and server projects as integration tests** of your understanding; if you can build them unaided, you've absorbed the core.
【Coverage Limits】
This guide is synthesized from front matter, table of contents, and stratified excerpts; it maps the book's structure and themes but does not summarize individual code examples or chapter-level detail beyond what the excerpts show.
Excerpt 1
es, and appendixes on Rust development tools and editions. COVERS RUST 2018 T H E R U S T P R O G R A M M I N G L A N G U A G E S T E V E K L A B N I K and C...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
The Rust Programming Language (Covers Rust 2018) (Steve Klabnik, Carol Nichols)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
The Rust Programming Language (Covers Rust 2018) (Steve Klabnik, Carol Nichols)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
The Rust Programming Language (Covers Rust 2018) (Steve Klabnik, Carol Nichols)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment