《Programming Rust, 2nd Edition》简介:

The Rust programming language offers the rare and valuable combination of statically verified memory safety and low-level control. Imagine C++ but without dangling pointers, null pointer dereferences, leaks, or buffer overruns. With this practical guide, systems programmers will understand Rust’s rules clearly and economically. You’ll learn how to express programs that Rust can prove are free of a broad class of common errors.

Rust brings the benefits of an expressive modern type system to systems programming. Authors Jim Blandy and Jason Orendorff demonstrate how Rust’s features put programmers in control over memory consumption and processor use, combining predictable performance with memory safety and trustworthy concurrency.

You’ll learn:

How to write fast, safe, concurrent programs in Rust

Rust’s rules for managing memory efficiently, including ownership, borrowing, moves, and lifetimes

How to design interfaces that fit well into the Rust ecosystem

Rust’s all-purpose Cargo tool for building, testing, and managing Rust packages

High-level features like traits, generics, closures, and iterators that make Rust productive and flexible

《Programming Rust, 2nd Edition》摘录:

You've heard that Rust lets you write safe, fase, concurrent programs. This is the chapter where we show you how it's done. We'll cover three ways to use Rust threads: 1. Fork-join parallelism 2. Channels 3. Shared muatble state