Book description
Rust's popularity is growing, due in part to features like memory safety, type safety, and thread safety. But these same elements can also make learning Rust a challenge, even for experienced programmers. This practical guide helps you make the transition to writing idiomatic Rust—while also making full use of Rust's type system, safety guarantees, and burgeoning ecosystem.
If you're a software engineer who has experience with an existing compiled language, or if you've struggled to convert a basic understanding of Rust syntax into working programs, this book is for you. By focusing on the conceptual differences between Rust and other compiled languages, and by providing specific recommendations that programmers can easily follow, Effective Rust will soon have you writing fluent Rust, not just badly translated C++.
- Understand the structure of Rust's type system
- Learn Rust idioms for error handling, iteration, and more
- Discover how to work with Rust's crate ecosystem
- Use Rust's type system to express your design
- Win fights with the borrow checker
- Build a robust project that takes full advantage of the Rust tooling ecosystem
Publisher resources
Table of contents
- Preface
-
1. Types
- Item 1: Use the type system to express your data structures
- Item 2: Use the type system to express common behavior
- Item 3: Prefer Option and Result transforms over explicit match expressions
- Item 4: Prefer idiomatic Error types
- Item 5: Understand type conversions
- Item 6: Embrace the newtype pattern
- Item 7: Use builders for complex types
- Item 8: Familiarize yourself with reference and pointer types
- Item 9: Consider using iterator transforms instead of explicit loops
- 2. Traits
- 3. Concepts
- 4. Dependencies
- 5. Tooling
- 6. Beyond Standard Rust
- Afterword
- Index
- About the Author
Product information
- Title: Effective Rust
- Author(s):
- Release date: April 2024
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098151409
You might also like
book
Rust in Action
Rust in Action introduces the Rust programming language by exploring numerous systems programming concepts and techniques. …
book
Rust for Rustaceans
For developers who’ve mastered the basics, this book is the next step on your way to …
book
Programming Rust, 2nd Edition
Systems programming provides the foundation for the world's computation. Writing performance-sensitive code requires a programming language …
book
The Rust Programming Language, 2nd Edition
The Rust Programming Language, 2nd Edition is the official guide to Rust 2021: an open source …