Course details
Rust
Learn Rust from the ground up: its syntax and types, the ownership and borrowing rules that make it safe, error handling with Option and Result, modules and crates, and testing. Every lesson builds on one small lending-library program.
Course curriculum
Introduction to Rust5 lessons
Meet Rust and the problem it solves, then learn the everyday building blocks: variables and constants, control flow, functions and methods, and pattern matching. Every example belongs to one small lending-library program.
Language Basics5 lessons
Install Rust with rustup, create and run a project with Cargo, and choose an editor or the online Playground. Then learn the scalar types, text, tuples and arrays, and the growable collections every Rust program leans on.
Ownership and Borrowing3 lessons
See where values live in memory, learn the three ownership rules that decide when each value is freed, and borrow values through references and slices without taking them over. This is the idea the rest of Rust is built on.
Types and Error Handling5 lessons
Build the library's own types with structs, impl blocks and enums, then handle missing values and failures with Option and Result, pass errors upward with the ? operator, and define your own error type with traits.
Modules and Crates3 lessons
Split the library program into modules with clear public and private parts, add third-party crates with Cargo and understand version ranges and the lock file, then prepare and publish a crate on crates.io.
Testing3 lessons
Write unit tests beside the code with #[test] and assert macros, test the public API from the tests folder, replace slow or unpredictable parts with test doubles, and let property-based tests hunt for the inputs you did not think of.
