Rust for Programmers
A fast-paced tour of Rust for people who already code in another language: ownership and borrowing, expressions and pattern matching, closures and iterators, enums, Option and Result, traits, generics, lifetimes, macros and the tooling around them.
- Intermediate level
- 8 modules
- 31 lessons
- 88 tasks and questions
Syllabus
01Getting StartedWhy Rust exists, how a Rust program is laid out, and how Cargo builds projects and manages dependencies.3 lessons
02Variables, Ownership and BorrowingExpressions and statements, immutable-by-default variables, constants, the ownership rules that replace a garbage collector, references and borrowing, modules, macros and attributes.6 lessons
03Control Flowif as an expression, pattern matching with match, if let, while let and let-else, and Rust's three kinds of loops.4 lessons
05TypesRust's primitive types and casts, arrays and vectors, &str and String, tuples and structs with methods, enums with data, and the Option and Result types that replace null and exceptions.7 lessons
06Traits, Generics and LifetimesDefine shared behavior with traits, write code that works for many types with generics and trait bounds, give names to types with aliases, and understand lifetime annotations.3 lessons
07MacrosWrite your own declarative macros with macro_rules!, and understand what procedural macros such as custom derives do.2 lessons
08Libraries and ToolingFind and use crates, document your code with rustdoc, and use the standard toolchain for formatting, linting and testing.3 lessons