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 traitsUsing Rust's memory safety guarantees to build fast, safe programsTesting, error handling, and effective refactoringGenerics, smart pointers, multithreading, trait objects, and advanced pattern matchingUsing Cargo, Rust's built-in package manager, to build, test, and document your code and manage dependenciesHow best to use Rust's advanced compiler with compiler-led programming techniquesYou'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.