Rust Roadmap

Advanced Rust programming topics.

33 stages · 132 topics 0% done
Rust
✓ Ownership Rules
✓ Borrowing & References
✓ Foundations
✓ Copy vs Move Semantics
✓ Lifetime Basics
✓ Core Concepts
✓ NLL (Non-Lexical Lifetimes)
✓ Interior Mutability (Cell, RefCell)
✓ Drop Order & Scopes
✓ Clone-on-Write (Cow)
✓ Intermediate Skills
✓ Lifetime Elision Rules
✓ Lifetime Subtyping & Variance
✓ Advanced Topics
✓ &'static Lifetime
✓ Lifetime Bounds on Generics
✓ Lifetime of Trait Objects
✓ Higher-Ranked Trait Bounds (for<'a>)
✓ Expert Level
✓ Self-Referential Structs with Pin
✓ Unsafe Superpowers
✓ Mastery
✓ Raw Pointers (*const T, *mut T)
✓ Unsafe Traits: Send & Sync
✓ FFI: Calling C from Rust
✓ Inline Assembly (asm!)
✓ Ecosystem
✓ Unsafe Function Safety Contracts
✓ Pin & Self-Referential Structs
✓ Architecture
✓ Trait Bounds & Where Clauses
✓ Associated Types vs Generics
✓ Trait Objects & Dynamic Dispatch
✓ Default Implementations & Specialization
✓ Optimization
✓ Coherence & Orphan Rule
✓ Generic Associated Types (GATs)
✓ Deployment
✓ Derive Macros & #[derive]
✓ Declarative Macros (macro_rules!)
✓ Repetition & Metavariables
✓ Hygiene & Token Trees
✓ Phase 11
✓ Procedural Macros Overview
✓ Derive Mode Procedural Macros
✓ Phase 12
✓ Attribute Macros
✓ Function-like Procedural Macros
✓ Future Trait & Poll
✓ async/await Desugaring
✓ Phase 13
✓ Tokio Runtime Architecture
✓ Async Task Lifecycle
✓ Phase 14
✓ Async Traits (trait_variant)
✓ Pin Projections & Pin Hacks
✓ Select! Macro & Cancellation
✓ Send & Sync Auto Traits
✓ Phase 15
✓ std::sync::Arc & Mutex
✓ RwLock & Barrier
✓ Phase 16
✓ Crossbeam Scoped Threads
✓ Channels (mpsc, tokio, crossbeam)
✓ Atomic Types & Ordering
✓ Lock-Free Data Structures
✓ Phase 17
✓ extern "C" Declarations
✓ bindgen Usage
✓ Phase 18
✓ cbindgen for C Headers
✓ Callbacks with unsafe extern fn
✓ Error Handling Across FFI
✓ repr(C) & repr(transparent)
✓ Phase 19
✓ Safe FFI Wrapper Pattern
✓ Global Allocator Trait
✓ Phase 20
✓ Custom Allocator Implementation
✓ Allocator API & AllocError
✓ #[global_allocator]
✓ no_std Environment
✓ Phase 21
✓ Core vs Std Crate Differences
✓ Embedded Rust with alloc
✓ Phase 22
✓ TokenStream Manipulation
✓ Syn & Quote Crates
✓ Attribute Macro Parameters
✓ Derive Macro Field Analysis
✓ Phase 23
✓ span_source_call_site() for Error Reporting
✓ Compound Macros
✓ Phase 24
✓ Testing Procedural Macros
✓ Result<T, E> & ? Operator
✓ thiserror Crate
✓ anyhow for Application Errors
✓ Phase 25
✓ Error Trait & Custom Errors
✓ Context & Backtrace
✓ Phase 26
✓ Error Stacking & Sources
✓ Panic Safety & Catch Unwind
✓ Unit & Integration Tests
✓ Test Organization & Workspaces
✓ Phase 27
✓ Test Fixtures with test_case
✓ Property-Based Testing (proptest)
✓ Phase 28
✓ Fuzz Testing (cargo-fuzz)
✓ Doc-tests & Examples
✓ Benchmarking with criterion
✓ Cortex-M Bare Metal
✓ Phase 29
✓ Peripheral Access Crates (PAC)
✓ HAL (Hardware Abstraction Layers)
✓ Phase 30
✓ RTIC Framework
✓ GPIO & Interrupts
✓ Embedded Storage (embedded-storage)
✓ Defmt for Debugging
✓ Phase 31
✓ wasm-pack Build Pipeline
✓ wasm-bindgen & JS Interop
✓ Phase 32
✓ Web-sys & Js-sys
✓ WebAssembly Linear Memory
✓ Performance Optimization for WASM
✓ wasm-bindgen Rayon
✓ Phase 33
✓ Server-Side WebAssembly (WASI)
Text version of this roadmap

1. Foundations

  • Ownership Rules: Rust's ownership system eliminates memory bugs without garbage collection. Each value has exactly one owner; when the owner goes out of scope, the value is dropped. Values can be moved to new owners or borrowed via references. The compiler enforces these rules at compile time.
  • Borrowing & References
  • Copy vs Move Semantics

2. Core Concepts

  • Lifetime Basics
  • NLL (Non-Lexical Lifetimes)
  • Interior Mutability (Cell, RefCell)

3. Intermediate Skills

  • Drop Order & Scopes
  • Clone-on-Write (Cow)
  • Lifetime Elision Rules

4. Advanced Topics

  • Lifetime Subtyping & Variance
  • &'static Lifetime
  • Lifetime Bounds on Generics

5. Expert Level

  • Lifetime of Trait Objects
  • Higher-Ranked Trait Bounds (for<'a>)
  • Self-Referential Structs with Pin

6. Mastery

  • Unsafe Superpowers
  • Raw Pointers (*const T, *mut T)
  • Unsafe Traits: Send & Sync

7. Ecosystem

  • FFI: Calling C from Rust
  • Inline Assembly (asm!)
  • Unsafe Function Safety Contracts

8. Architecture

  • Pin & Self-Referential Structs
  • Trait Bounds & Where Clauses
  • Associated Types vs Generics

9. Optimization

  • Trait Objects & Dynamic Dispatch
  • Default Implementations & Specialization: The default implementations & specialization pattern in Rust provides a structured approach to handling Traits & Generics. Understanding the implementation details helps write more robust and maintainable code.
  • Coherence & Orphan Rule

10. Deployment

  • Generic Associated Types (GATs)
  • Derive Macros & #[derive]
  • Declarative Macros (macro_rules!)

11. Phase 11

  • Repetition & Metavariables
  • Hygiene & Token Trees
  • Procedural Macros Overview

12. Phase 12

  • Derive Mode Procedural Macros
  • Attribute Macros
  • Function-like Procedural Macros

13. Phase 13

  • Future Trait & Poll
  • async/await Desugaring
  • Tokio Runtime Architecture

14. Phase 14

  • Async Task Lifecycle
  • Async Traits (trait_variant)
  • Pin Projections & Pin Hacks

15. Phase 15

  • Select! Macro & Cancellation
  • Send & Sync Auto Traits
  • std::sync::Arc & Mutex

16. Phase 16

  • RwLock & Barrier
  • Crossbeam Scoped Threads
  • Channels (mpsc, tokio, crossbeam)

17. Phase 17

  • Atomic Types & Ordering
  • Lock-Free Data Structures
  • extern "C" Declarations

18. Phase 18

  • bindgen Usage
  • cbindgen for C Headers
  • Callbacks with unsafe extern fn

19. Phase 19

  • Error Handling Across FFI
  • repr(C) & repr(transparent)
  • Safe FFI Wrapper Pattern

20. Phase 20

  • Global Allocator Trait
  • Custom Allocator Implementation: The custom allocator implementation pattern in Rust provides a structured approach to handling Allocators & no_std. Understanding the implementation details helps write more robust and maintainable code.
  • Allocator API & AllocError

21. Phase 21

  • #[global_allocator]
  • no_std Environment
  • Core vs Std Crate Differences

22. Phase 22

  • Embedded Rust with alloc
  • TokenStream Manipulation
  • Syn & Quote Crates

23. Phase 23

  • Attribute Macro Parameters
  • Derive Macro Field Analysis
  • span_source_call_site() for Error Reporting

24. Phase 24

  • Compound Macros
  • Testing Procedural Macros
  • Result<T, E> & ? Operator

25. Phase 25

  • thiserror Crate
  • anyhow for Application Errors
  • Error Trait & Custom Errors

26. Phase 26

  • Context & Backtrace
  • Error Stacking & Sources
  • Panic Safety & Catch Unwind

27. Phase 27

  • Unit & Integration Tests
  • Test Organization & Workspaces
  • Test Fixtures with test_case

28. Phase 28

  • Property-Based Testing (proptest)
  • Fuzz Testing (cargo-fuzz)
  • Doc-tests & Examples

29. Phase 29

  • Benchmarking with criterion
  • Cortex-M Bare Metal
  • Peripheral Access Crates (PAC)

30. Phase 30

  • HAL (Hardware Abstraction Layers)
  • RTIC Framework
  • GPIO & Interrupts

31. Phase 31

  • Embedded Storage (embedded-storage)
  • Defmt for Debugging
  • wasm-pack Build Pipeline

32. Phase 32

  • wasm-bindgen & JS Interop
  • Web-sys & Js-sys
  • WebAssembly Linear Memory

33. Phase 33

  • Performance Optimization for WASM: Performance considerations for performance optimization for wasm in Rust significantly impact application behavior. Understanding optimization strategies helps avoid common pitfalls and improve runtime characteristics.
  • wasm-bindgen Rayon
  • Server-Side WebAssembly (WASI)