A step-by-step Rust programming tutorial covering fundamental concepts.
- Lesson 1: Basics - Variables, mutability, basic types, and control flow
- Lesson 2: Ownership and Borrowing - String, &str, ownership, borrowing, and slices
- Lesson 3: Structs and Methods - Custom data types, implementation blocks, and associated functions
- Lesson 4: Enums and Pattern Matching - Defining enums, pattern matching with match and if let
- Lesson 5: Error Handling - Result, Option, custom errors, and error propagation
- Lesson 6: Generics and Traits - Generic types, trait definitions, and implementations
- Lesson 7: Collections - Vectors, strings, and hash maps
- Lesson 8: Lifetimes - Lifetime annotations and reference validity
- Lesson 9: Closures and Iterators - Anonymous functions and lazy evaluation
- Lesson 10: Smart Pointers - Box, Rc, Arc, and RefCell
- Lesson 11: Concurrency with Threads - Threads, channels, and shared state
- Lesson 12: Async Programming - Asynchronous functions and futures
- Lesson 13: Testing - Unit tests and assertions
- Lesson 14: Modules and Crates - Code organization and visibility
See Lesson 1 for Rust installation instructions and your first program.
- Rust toolchain (rustc, cargo) installed via rustup
- Basic command line knowledge
Each lesson folder contains:
- Source code (.rs files)
- A README.md with detailed explanations
- A run script (run_lessonX.sh) for convenience
Navigate to a lesson folder and follow the instructions in its README.md.