Rust Tutorials
A full Rust course: ownership, borrowing, structs, enums, Cargo, traits, and Result.
This course includes 18 lessons grouped from first steps to more capable workflows. Work through a group in order, or jump to the task you need today. Every lesson includes explanations, copyable examples, and tips written for beginners.
Cheatsheet · Search this course · Programming category · All categories
Getting started
Topic pageOwnership and borrowing
Topic pageData and control
Topic page- EnumsModel alternatives with enums and associated data.
- Option and ResultHandle missing values and recoverable errors with Option and Result.
- Pattern MatchingDestructure values with match and if let.
- VectorsStore growable lists of values in Vec.
- StringsDistinguish String and &str and build text safely.
Organization and errors
Topic page- FunctionsWrite functions with typed parameters and return values.
- ModulesOrganize code with mod, use, and visibility rules.
- CratesAdd dependencies from crates.io with Cargo.toml.
- Error HandlingPropagate recoverable errors with Result and the ? operator.
- Traits IntroShare behavior across types with traits.
- Cargo TestWrite unit tests and run them with cargo test.