Rust in Action introduces the Rust programming language by exploring numerous systems programming concepts and techniques. You'll be learning Rust by delving into how computers work under the hood. You'll find yourself playing with persistent storage, memory, networking and even tinkering with CPU instructions. The book takes you through using Rust to extend other applications and teaches you tricks to write blindingly fast code. You'll also discover parallel and concurrent programming. Filled to the brim with real-life use cases and scenarios, you'll go beyond the Rust syntax and see what Rust has to offer in real-world use cases.
About the technology
Rust is the perfect language for systems programming. It delivers the low-level power of C along with rock-solid safety features that let you code fearlessly. Ideal for applications requiring concurrency, Rust programs are compact, readable, and blazingly fast. Best of all, Rust’s famously smart compiler helps you avoid even subtle coding errors.
About the book
Rust in Action is a hands-on guide to systems programming with Rust. Written for inquisitive programmers, it presents real-world use cases that go far beyond syntax and structure. You’ll explore Rust implementations for file manipulation, networking, and kernel-level programming and discover awesome techniques for parallelism and concurrency. Along the way, you’ll master Rust’s unique borrow checker model for memory management without a garbage collector.
What's inside
• Elementary to advanced Rust programming
• Practical examples from systems programming
• Command-line, graphical and networked applications
About the reader
For intermediate programmers. No previous experience with Rust required.
About the author
Tim McNamara uses Rust to build data processing pipelines and generative art. He is an expert in natural language processing and data engineering.
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】
A hands-on tour of systems programming that teaches Rust by building real things—file tools, memory models, network clients, and low-level CPU tricks—so intermediate programmers can move past syntax into how computers actually work. Best for developers with some programming experience who want Rust's safety model explained through concrete projects rather than abstract theory.
【Book Arc】
- **Opening (~0%–10%)**: Sets up the toolchain and mindset—`cargo` as build system and package manager, project layout, and why Rust's strict compiler is a feature, not a hurdle. Frames the book's gradual approach to a large language.
- **Early (~10%–30%)**: Language foundations—numeric types and literals, flow control (`for`, `match`), strongly typed functions, generics with trait bounds, and a first real project (a `grep`-style search tool using regex and CLI argument parsing).
- **Early–Middle (~30%–45%)**: Distinctives of Rust's type system—modeling files with structs, defining behavior with traits (`Read`, `PartialEq`), and the borrow checker's aliasing rules, including the `let` vs `const` distinction and interior mutability.
- **Middle (~45%–60%)**: Systems-level concerns—interacting with OS globals like `errno`, inspecting CPU flags, and the discipline of type-safe error handling versus raw integer error codes.
- **Late (~60%–90%)**: Applied systems programming—persistent storage, memory, networking, extending other applications, and techniques for fast code. (Excerpts do not cover the specific chapter-by-chapter breakdown here.)
- **Ending (~90%–100%)**: Advanced low-level work—CPU instructions, signals, and exception handling via deeply nested call stacks (the `sjlj` project), plus a candid note on portability and revising how we think about exceptions.
【Key Takeaways】
- **`cargo` is both build system and package manager** (Opening): it compiles, runs, and manages dependencies, with `Cargo.toml` for metadata and `Cargo.lock` pinning exact versions for reproducible builds.
- **The compiler is strict but helpful** (Early): Rust surfaces errors like misnamed variables and data races at compile time, so users don't hit them at runtime—an adjustment for dynamic-language programmers.
- **Rust is large; learn it gradually** (Early): a rich type system and dozens of keywords create a steep curve, so the book defers advanced concepts and starts with a minimal subset.
- **Rust is not a security panacea** (Early): case studies like Heartbleed and `goto fail;` show Rust would likely have helped, but similar bugs remain possible—memory safety is a tool, not a guarantee.
- **Traits define shared behavior** (Middle): once you understand what `PartialEq` does for one type, you understand it for every type; `for` loops are shorthand for `IntoIterator`, and math relies on traits like `Add`.
- **`let` is about aliasing, not just immutability** (Middle): read-only borrows may alias, mutable borrows never do; types like `Arc` and `Rc` present an immutable façade while changing internal state (interior mutability).
- **Systems programming means respecting OS conventions** (Middle): global `errno`, CPU flags, and register inspection are common even when Rust would prefer type-safe errors—worth knowing for low-level work.
- **Real projects cement the concepts** (Early–Middle): building `grep-lite` with regex, `clap` argument parsing, and generic `BufRead` readers shows how traits, generics, and I/O fit together in practice.
【Reading Tips】
- **Deep-read the type-system chapters** (structs, traits, borrow checker): these are the conceptual core; skimming them will make later systems chapters feel arbitrary.
- **Skim the toolchain setup** if you already know `cargo`; the value is in the project structure conventions, not the commands.
- **Type out the projects**—`grep-lite` and the `sjlj` exception-handling exercise—rather than reading listings; the borrow checker's lessons land only when you hit its errors yourself.
- **Treat the security case studies as calibration**, not trivia: they set realistic expectations about what Rust prevents and what it doesn't.
- **Don't fear the deferred advanced material**; the book intentionally sequences concepts, so trust the order and revisit earlier chapters when later ones reference them.
【Coverage Limits】
The excerpts cover the book's framing, early language foundations, type-system distinctives, and the ending's low-level exception-handling material, but the middle-to-late applied chapters (persistent storage, networking, extending applications, performance tricks) are only summarized at the blurb level. Specific chapter titles and detailed content for those sections are not available in the excerpts.
Excerpt 1
Rust to build data processing pipelines and generative art. He is an expert in natural language processing and data engineering. Systems programming concepts...
ignated as CVE-2014-0160,16 was caused by re-using a buffer incorrectly. A buffer is a space set aside in memory for receiving input. Data can leak from one...
:new(10, 0) a duration between two points in time 14 ); 15 Because std::time::Duration does 16 println!("{}", floats); not implement the std::fmt::Display 17...
o 2 unused variables within functions 3 #[derive(Debug)] 4 struct File; Defines a stub File type 5 6 trait Read { P r o vides a specific 7 fn read( name for...
an implementation impl Clone for CubeSat { of Clone. fn clone(&self) -> Self { CubeSat { id: self.id } If desired, we can write out } the creation of a new o...
other programs through Rust’s foreign function interface. 6.1 Pointers Pointers are how computers refer to data that isn’t immediately accessible. This topic...
cope. These are often called anonymous or lambda functions. Closures are a common feature within idiomatic Rust code, but this book tends to avoid those wher...
the chapter and also introduces the main library code. The library code will not change as the subsequent two systems are built on top of it. Before we get t...
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
Rust in Action Systems programming concepts and techniques (Timothy Samuel McNamara) (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 E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Rust in Action Systems programming concepts and techniques (Timothy Samuel McNamara) (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