Why learn Rust?
Rust is the most loved programming language seven years running. It combines the performance of C++ with memory safety guarantees — no garbage collector, no null pointer exceptions, no data races. Companies like Mozilla, Cloudflare, Discord, and AWS use Rust for systems programming, web infrastructure, and game engines.
What you'll learn in this Rust tutorial
This free, interactive Rust course covers variables, data types, ownership, borrowing, lifetimes, structs, enums, pattern matching, traits, error handling, generics, concurrency, and modules — all by compiling and running real Rust code in your browser.
37 topics · 235 hands-on lessons · all levels
Rust tutorial topics
- 1Getting Started with RustWrite your first Rust program, understand the basic structure, and get comfortab… · 8 lessons · 12 min
- 2Variables and MutabilityLearn how Rust handles variables: immutable by default, explicit mutation, shado… · 8 lessons · 15 min
- 3Variables and Types in RustExplore Rust's immutability, scalar types, String vs &str, shadowing, constants,… · 6 lessons · 15 min
- 4Data TypesIntegers, floats, booleans, and characters — Rust's primitive building blocks. · 8 lessons · 15 min
- 5Output and Formatting in RustMaster println!, print!, debug formatting, number precision, and padding in Rust… · 5 lessons · 15 min
- 6StringsString slices and owned Strings, concatenation, formatting, and common string me… · 8 lessons · 18 min
- 7Control Flowif/else expressions, loop, while, for — directing program execution in Rust. · 8 lessons · 18 min
- 8Loops in RustUse loop, while, and for to repeat code and iterate in Rust. · 5 lessons · 12 min
- 9Arrays and Slices in RustWork with fixed-size arrays and slices in Rust. · 3 lessons · 15 min
- 10FunctionsDefine and call functions, pass parameters, return values, and understand Rust's… · 8 lessons · 18 min
- 11HashMap in RustStore and look up key-value pairs with std::collections::HashMap. · 2 lessons · 12 min
- 12OwnershipMove semantics, the Copy trait, clone, and how Rust manages memory without a gar… · 8 lessons · 22 min
- 13References and BorrowingBorrow values with & references. Understand mutable borrows and the rules that p… · 8 lessons · 20 min
- 14Ownership and References in RustUnderstand ownership, borrowing, and references in Rust. · 3 lessons · 15 min
- 15SlicesView parts of arrays and strings without copying. Understanding &[T] and &str. · 8 lessons · 15 min
- 16StructsDefine custom data types, add methods with impl, and use associated functions as… · 8 lessons · 20 min
- 17Enums and OptionDefine enums with data, use Option to represent nullable values, and avoid null … · 8 lessons · 20 min
- 18Methods and impl in RustAdd methods to structs with impl blocks. · 2 lessons · 12 min
- 19Traits in RustDefine shared behavior with traits and implement them for types. · 2 lessons · 15 min
- 20Pattern Matchingmaster match expressions, destructuring, guards, and the @ binding operator. · 8 lessons · 20 min
- 21VectorsVec<T> — Rust's growable array. Create, modify, iterate, and transform vectors. · 8 lessons · 18 min
- 22HashMapStore key-value pairs with HashMap. Insert, lookup, update, and iterate. · 8 lessons · 18 min
- 23Crates and Modules in RustOrganize code into modules and use the standard library. · 2 lessons · 10 min
- 24Error HandlingResult<T,E> for recoverable errors, the ? operator, and when to use panic vs Res… · 8 lessons · 20 min
- 25TraitsDefine shared behaviour with traits, implement them for your types, and use trai… · 8 lessons · 20 min
- 26GenericsWrite code that works for multiple types with generic functions, structs, and en… · 8 lessons · 18 min
- 27HTTP in RustMake HTTP requests using reqwest or std library basics. · 1 lessons · 12 min
- 28ClosuresAnonymous functions that capture their environment. Fn, FnMut, FnOnce traits. · 8 lessons · 18 min
- 29JSON in RustParse and serialize JSON with serde_json or manual string building. · 1 lessons · 12 min
- 30IteratorsThe Iterator trait, lazy evaluation, map/filter/fold, and writing your own itera… · 8 lessons · 20 min
- 31Iterators and Closures in RustUse iterators, closures, and iterator adapters (map, filter, collect). · 3 lessons · 15 min
- 32Modules and CratesOrganise code with mod, control visibility with pub, and use the use keyword. · 8 lessons · 18 min
- 33LifetimesLifetime annotations, the borrow checker, and why Rust needs lifetime parameters… · 8 lessons · 22 min
- 34Smart PointersBox<T> for heap allocation, Rc<T> for shared ownership, and RefCell<T> for inter… · 8 lessons · 22 min
- 35ConcurrencySpawn threads, share data with Arc and Mutex, and pass messages with channels. · 8 lessons · 22 min
- 36TestingWrite unit tests with #[test], use assert macros, and organise tests in Rust. · 8 lessons · 18 min
- 37File I/ORead and write files with std::fs, handle errors with Result, and work with path… · 8 lessons · 18 min
Who is this Rust course for?
Developers who want to write fast, safe, and reliable code, systems programmers moving away from C/C++, and engineers preparing for Rust coding interviews.