Programming in Rust
622 pages
English
PDF
4.5

Programming in Rust

Programming in Rust

Author:

Year:

Summary:

Introduction

The book "Programming Rust" by authors Jim Blandy, Jason Orendorff, and Leonora Tindall is one of the most authoritative and in-depth guides to the Rust language. Published in 2021 (second edition), it covers all the key features of the language up to Rust 2021. The book is aimed at experienced programmers who want to master Rust not superficially, but at a level that allows them to write reliable, performant, and safe systems code.

What this book is about

The book starts with the basics: tool installation, syntax, type system. However, already in the first chapters, the authors immerse the reader in Rust's central concept — ownership and borrowing. It then covers in detail: lifetimes, smart pointers, traits, generic programming, closures, iterators, collections, error handling, I/O, concurrency (including async/await), unsafe code, and interfacing with C. Each topic is accompanied by practical examples and explanations of why Rust made these particular design choices.

Who this book is for

The book is intended for programmers already familiar with C, C++, or Java. If you have never programmed before, starting with this book will be difficult — the authors do not explain basic concepts like loops or functions. However, for those who want to transition to Rust from other systems programming languages, this is an ideal textbook.

What the reader will learn

  • Ownership and borrowing system — how Rust guarantees memory safety without a garbage collector.
  • Lifetimes — how the compiler checks the validity of references.
  • Traits and generics — a powerful abstraction system with no overhead.
  • Concurrency — how to write safe multithreaded programs.
  • Async/await — asynchronous programming in Rust.
  • Unsafe Rust — when and how to bypass safety guarantees.
  • FFI — calling C code from Rust and vice versa.
  • Testing and documentation — built-in tools.

Strengths

The first and foremost advantage is the depth of coverage. The authors don't just show the syntax; they explain why the language is designed the way it is. For example, the chapter on lifetimes is not limited to elision rules but shows how the compiler infers lifetimes. Second is the structure: the book logically progresses from simple to complex, with each new topic building on the previous ones. Third are the examples: they are realistic and often taken from real projects (e.g., working with a JSON parser). Finally, relevance: the second edition covers Rust 2021, including stabilized features like const generics and improved async.

Who is recommended

The book is a must-read for anyone seriously intending to use Rust in production. It will be useful for developers of systems software, embedded systems, web services (via async), as well as those who want to understand how modern programming languages are designed from a memory safety perspective. If you have already read The Rust Programming Language (the official book) and want to go deeper — "Programming Rust" will be an excellent next step.

Recommendations