RustCanon

Advanced Rust Patterns Showroom

Master advanced Rust with 41 interactive patterns across 11 topics. Learn through detailed explanations, runnable examples, and real-world use cases.

41 Patterns
41 Interactive
2 Live Demos

Find Your Perfect Pattern

Describe what you want to build and discover the best patterns

Try searching for:

🔐
Ownership & Borrowing Patterns
Master advanced ownership patterns, split borrowing, and RAII guards
Patterns5
Split BorrowingInterior Mutability PatternsSelf-Referential Structures+2 more
🎯
Smart Pointers & Interior Mutability
Rc, Arc, Weak, Cow and custom smart pointer patterns
Patterns4
Rc/Arc Usage PatternsWeak PointersClone-on-Write (Cow)+1 more
⚠️
Error Handling Excellence
Custom errors, composition, and Result combinators
Patterns4
Custom Error TypesError CompositionResult Combinators+1 more
🎨
Advanced Trait System
Associated types, HRTBs, trait objects, and blanket implementations
Patterns5
Associated Types vs GenericsHigher-Ranked Trait BoundsTrait Objects & Dynamic Dispatch+2 more
Async/Await & Futures
Custom futures, streams, and async patterns
Patterns4
Custom Future ImplementationStream ProcessingSelect/Join Patterns+1 more
🔮
Macro Mastery
Declarative and procedural macros, DSL creation
Patterns3
Declarative MacrosProcedural MacrosDSL Creation
🚀
Zero-Cost Abstractions
Iterator optimization, monomorphization, and const evaluation
Patterns3
Iterator CompositionMonomorphizationConst Evaluation
🎭
Type-State Programming
State machines in types, builder pattern, phantom types
Patterns3
State Machines in TypesBuilder with TypeStatePhantom Types
🔀
Concurrency Patterns
Send/Sync, channels, atomics, and thread pools
Patterns4
Send/Sync BoundsChannel PatternsLock-Free Data Structures+1 more
Unsafe & FFI
Safe abstractions, C interop, and raw pointers
Patterns3
Safe Abstractions Over UnsafeFFI BoundariesMemory Layout
Performance Optimization
Profiling, SIMD, custom allocators, and benchmarking
Patterns3
Memory Layout OptimizationSIMD PatternsBenchmarking with Criterion

Built with 🦀 care, ❤️ love, and ☕ coffee for the Rust community

Created by GPLinkedInGitHub