Rust: the basics
An example course that follows The Rust Programming Language (the book): a few chapters on syntax, ownership, structs and enums. Each problem tests one thing you should be able to write from memory, mostly as real code checked by tests, with a few flashcards for the rules worth knowing word for word.
Rust compiles on our compile server and then runs in your browser, so the first run of a session takes a few seconds.
What's inside
- Foundations
A handful of small, self-contained Rust problems to warm up on. They span basic syntax, iterators, pattern matching, and lifetimes — the surface area you'll to…
- Ownership & Borrowing
Rust's memory safety comes from its ownership system — no garbage collector needed. Ownership Rules 1. Each value has exactly one owner 2. There can only be on…
- Structs
Defining Structs Structs group related data. Fields are named and typed. Method Syntax Methods live in impl blocks. &self borrows the struct.
- Enums & Pattern Matching
Enums Enums can hold data in each variant. Match match must be exhaustive. Option<T Rust's replacement for null. Some(T) or None.