Muutke küpsiste eelistusi

Design Patterns and Best Practices in Rust: Enhance your Rust skills by applying idiomatic approaches to real-world software design [Pehme köide]

  • Formaat: Paperback / softback, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 29-Apr-2026
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1836209479
  • ISBN-13: 9781836209478
  • Pehme köide
  • Hind: 63,89 €
  • See raamat ei ole veel ilmunud. Raamatu kohalejõudmiseks kulub orienteeruvalt 3-4 nädalat peale raamatu väljaandmist.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 29-Apr-2026
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1836209479
  • ISBN-13: 9781836209478
Write safer, more maintainable Rust code by identifying anti-patterns, applying idiomatic design patterns tailored to ownership, borrowing, and the type system, and learning when to adapt or avoid traditional solutions

Key Features

Leverage traits, ownership, borrowing, and lifetimes to structure expressive, modular Rust code Avoid common anti-patterns and design pitfalls with clear Rust-specific guidance Solve real-world problems using Rusts type system, functional idioms, and architecture patterns

Book DescriptionMany Rust developers run into problems when they try to apply familiar object-oriented or cross-language patterns to Rust projects. These mismatches often lead to confusing compiler errors, awkward workarounds, or brittle code. This book helps you avoid those traps by thinking in Rust and designing software that embraces ownership, borrowing, and type safety. The book begins with anti-patterns and common mistakes Rust developers often encounter, including misusing object-oriented thinking, over-relying on Clone, or treating the borrow checker as an obstacle. It then guides you through creational, structural, and behavioral patterns adapted to the language, illustrating how traditional approaches must be rethought for Rust. Youll explore architectural patterns that support clean module design, learn how to use the type system to encode program logic, and discover Rust-native techniques such as TypeState and RAII. The final chapters synthesize these ideas into a Rust-centric design mindset that helps you build software more effectively. By the end of this book, youll know how to avoid costly mistakes, apply effective patterns confidently, and design Rust applications that are clean, scalable, and reliable.What you will learn

Design maintainable applications using idiomatic Rust patterns Recognize common anti-patterns that lead to messy or inefficient code Adapt classic creational, structural, and behavioral patterns to Rust Leverage the type system to catch logic errors at compile time Structure code effectively with modules, traits, and clear interfaces Work with ownership, borrowing, and the type system to simplify data handling Implement functional techniques for clearer, expressive Rust code

Who this book is forRust developers ready to move beyond the basics and improve how they design and structure code will benefit from this book. If you're comfortable building simple applications and using tools like Cargo, this book will help you write cleaner, more idiomatic, and reliable software. Its ideal for those looking to understand which patterns work in Rust, how to avoid common traps, and how to tackle more complex, real-world projects with confidence.
Table of Contents

Why is Rust Different?
Anti-Pattern: Designing for Object Orientation
Anti-Pattern: Using Clone & Rc Everywhere
Don't Fight the Borrow Checker
Creational Patterns: Making Things
Structural Patterns: Connecting & Aggregating
Behavioural Patterns 1: Taking Actions
Behavioural Patterns 2: Keeping Track
Architectural Patterns
Patterns that Leverage the Type System
Patterns from Functional Programming
Patterns that use Unique Rust Features
Leaning into Rust
Evan Williams is an accomplished software architect and engineering leader with decades of experience in systems programming and low-level development. His expertise spans multiple programming languages, including Rust, C/C++, Python, and Java. He has architected and delivered large-scale, high-performance systems across industries like travel, healthcare, and logistics. His passion for quality code, elegant design patterns, and mentoring engineers makes him well-suited to guide readers in mastering Rust's unique approach. Evan is a proud axolotl owner! He also enjoys writing poetry & stories. He has many musical instruments that he plays badly, but joyously.