Rust in Action
Rust in Action
Summary:
Introduction
The book "Rust in Action" (original title — Rust in Action) by Tim McNamara, published in 2021, is not just another syntax reference, but a full-fledged practical guide for those who want not only to learn Rust but also to understand how to apply it in real projects. The author, an experienced developer and teacher, sets himself an ambitious goal: to show that Rust is not only a safe and fast language but also a tool for solving complex systems programming problems, from memory management to network protocols. The book spans 456 pages of dense but engaging material.
What is this book about?
"Rust in Action" is built around practical examples. Unlike many textbooks that start with the theory of data types and end with abstract tasks, McNamara immediately immerses the reader in context. You don't just write "Hello, World!" but create small, working utilities: parsers, network clients, emulators. Each chapter is a mini-project that gradually becomes more complex. The book covers:
- Basics of syntax and the ownership system — but with an emphasis on how it works "under the hood."
- Memory management: stack, heap, smart pointers (Box, Rc, Arc).
- Unit testing and error handling.
- Network programming: writing TCP/UDP clients and servers.
- Parsing binary data and text formats (JSON, CSV).
- Interaction with the operating system: files, processes, signals.
- Asynchronous programming (async/await) with a practical example.
Who is this book for?
The book is aimed at programmers already familiar with the basics of at least one language (C, C++, Python, Java). If you have never written code — start with a simpler introduction. However, if you want to switch to Rust from another language or deepen your knowledge, "Rust in Action" will be an excellent choice. It will be especially useful for:
- Systems programmers looking for a safe alternative to C/C++.
- Developers working with network protocols or embedded systems.
- Those who want to understand how Rust manages memory without a garbage collector.
What will the reader learn?
After reading, you will be able to:
- Confidently use the ownership and borrowing system.
- Write efficient programs without memory leaks and data races.
- Work with external dependencies via Cargo and crates.io.
- Create network applications from scratch.
- Parse and serialize data in various formats.
- Use asynchrony for high-load systems.
- Debug and profile code in Rust.
Strengths
The main advantage of the book is its practical focus. Each concept is backed by code that can be immediately run and modified. The author is not afraid to show complex topics (e.g., working with raw pointers or FFI), but does so gradually, with explanations. The writing style is also worth noting: McNamara writes vividly, with a touch of humor, which is rare in technical literature. The book also contains many references to documentation and additional resources, which helps deepen knowledge. Another plus is its relevance: the material is based on the stable version of Rust 2021, and all examples are working.
Who is it recommended for?
I recommend "Rust in Action" to everyone who wants to not just learn the syntax, but learn to think like a Rust developer. If you have already read "The Rust Programming Language" (the official book) and want to move on to real tasks — this book is for you. If you write in Python or JavaScript and want to understand how low-level programming works — it is also for you. The only caveat: the book requires thoughtful reading and practice. Don't try to devour it in a weekend — it's better to set aside several weeks to
Recommendations
DevOps for C# (.NET) Developers: From Code to Production
Concurrency in C++: A Practical Guide to Multithreaded Programming
C# (.NET) and Databases: A Practical Guide
Java for Beginners: Complete Course
PHP and Docker: Containerizing Applications
Concurrency in Rust: From Fundamentals to High-Load Systems