Rust Programming Lessons
Choose your path and start learning Rust programming step by step.
basics
Introduction to Rust
Learn Rust from scratch — discover why Rust is popular, set up your environment, and write your first program as a beginner
Variables and Data Types
Master Rust variables, mutability, and data types including integers, floats, booleans, characters, and type annotations
Control Flow
Master Rust control flow with if expressions, loops, and the match statement for conditional logic and pattern matching
Functions in Rust
Learn how to define Rust functions with parameters, return types, and expressions — the building blocks of every Rust program
Modules and Crates
Learn how to organize Rust code with modules and manage dependencies using crates and Cargo
intermediate
Closures
Rust closures tutorial — learn how closures capture variables, understand Fn, FnMut, and FnOnce traits, and use closures with iterators
Ownership & Borrowing
Rust ownership explained — understand move semantics, borrowing rules, and how Rust guarantees memory safety without a garbage collector
Option and Result
Master Rust Option and Result types for handling absence and errors with combinators, the ? operator, and error propagation
Error Handling
Learn Rust error handling with the Result type, panic!, recoverable vs unrecoverable errors, and the ? operator for propagation
Structs & Enums
Learn how to define Rust structs and enums to create custom data types, implement methods, and model your domain effectively
Borrowing in Depth
Deep dive into Rust borrowing and references — learn shared and mutable references, the borrow checker, and safe data access
Pattern Matching
Master Rust's powerful pattern matching with match expressions, if let, and destructuring
Collections
Learn to use Rust's standard collections including Vec, HashMap, and HashSet with iterators
Iterators
Master Rust's powerful iterator system to write expressive, efficient, and functional-style code
Strings and Text
Understand Rust's two string types, text manipulation, UTF-8 encoding, and common string operations
Testing in Rust
Learn how to write unit tests, integration tests, and use Rust's built-in testing framework to ensure your code is correct
File I/O
Learn how to read from and write to files in Rust using std::fs and std::io traits
Serde and JSON
Learn how to serialize and deserialize data structures to and from JSON using the serde and serde_json crates
advanced
Lifetimes
Rust lifetimes explained — learn lifetime annotations, elision rules, and how the borrow checker validates reference validity
Traits & Generics
Learn to write flexible, reusable code with Rust's trait system and generic programming
Concurrency
Learn safe concurrent programming in Rust with threads, message passing, and shared state
Smart Pointers
Understand Box, Rc, RefCell, and interior mutability patterns in Rust
Macros
Learn how to use and create Rust macros for metaprogramming and code generation at compile time
Async/Await
Master asynchronous programming in Rust with async/await syntax, Futures, and the Tokio runtime
CLI and Args
Build command-line tools in Rust by parsing arguments, handling flags, and structuring real-world CLI applications
Capstone Project: CLI Todo App
Build a complete command-line todo application combining structs, enums, error handling, traits, and collections