Rust Course

Rust is a systems programming language built around one big idea: memory safety without a garbage collector. Instead of a runtime cleaning up after you, the compiler enforces a strict set of ownership rules at compile time — and once your code compiles, whole categories of bugs common in C and C++ simply cannot happen.

What you'll learn

The first half of this course covers ground that will feel familiar if you've worked through the C or C++ courses on this site: variables, operators, conditionals, and loops. Rust's own personality shows up almost immediately, though — variables are immutable by default, and if is an expression rather than a statement. The course then spends real time on ownership and borrowing, the concept that makes Rust different from every other language covered on this site, before moving into functions, structs, enums and pattern matching, collections, and Rust's approach to error handling with Result and Option instead of exceptions.

Every lesson runs real code through rustc/cargo and shows you the exact output — including, in a few places, the exact compiler error Rust produces when code breaks its rules, since learning to read those errors is a real part of learning Rust.

Lessons

  1. Introduction
  2. Variables & Data Types
  3. Operators
  4. Conditionals
  5. Loops
  6. Ownership & Borrowing
  7. Functions
  8. Structs
  9. Enums & Pattern Matching
  10. Vectors & Collections
  11. Error Handling
  12. Traits
Where to start: begin with Introduction and go in order — don't skip past Ownership & Borrowing even if it's tempting to jump to something more familiar-looking like structs. Nearly everything after it only makes sense once ownership does.