🦀
🧩
Advanced

Rust Patterns

Pin, allocators, lock-free structures, unsafe — advanced patterns for real-world systems.

4 parts20 chapters
Start Reading

For Experienced Rustaceans

Table of Contents

0Introduction
Part I: Type-Level Patterns
1. Generics — The Full Picture
2. Traits In Depth
3. The Newtype and Type-State Patterns
4. PhantomData — Types That Carry No Data
Part II: Concurrency & Runtime
5. Channels and Message Passing
6. Concurrency vs Parallelism vs Threads
7. Closures and Higher-Order Functions
8. Functional vs. Imperative: When Elegance Wins
9. Smart Pointers and Interior Mutability
Part III: Systems & Production
10. Error Handling Patterns
11. Serialization, Zero-Copy, and Binary Data
12. Unsafe Rust — Controlled Danger
13. Macros — Code That Writes Code
14. Testing and Benchmarking Patterns
15. Crate Architecture and API Design
16. Async/Await Essentials
17. Exercises
Appendices
Summary and Reference Card
Capstone Project: Type-Safe Task Scheduler

microsoft/RustTraining — MIT & CC BY 4.0

@KhandakarRuhanv3.2.1