→
RUSTCurriculum
seven modules. Start anywhere — the recommended path is in order, but every theme is browsable. Themes without exercises yet are visible so you can see what's coming.
Progress saves per exercise — re-open any one to continue where you left off. Nothing leaves your browser.
Translation from TypeScript
let count: number = 5;
const PI = 3.14;
function double(n: number): number {
return n * 2;
}count := 5
const PI = 3.14
func double(n int) int {
return n * 2
} 1. Foundations
6 themes · 54 exercises
The "you already know this, just spelled differently" module for Rust. Entry points, printing, bindings, scalar types, control flow, functions, and the first taste of expressions. By the end, a TypeScript developer can read small Rust programs without yet being asked to solve ownership.
Rust prints with a macro, not a function. println! (note the
!) writes to stdout with a trailing newline; print! is the
no-newline variant. Format placeholders use {} inste…
Rust flips TypeScript's mutability default. Every binding starts
immutable; you opt in to mutability with let mut. Type
annotations come after the name (let x: i32 = 5), and th…
1.3
Scalar types
TypeScript gives beginners one number; Rust asks what number you
mean. This theme introduces signed and unsigned integers, usize,
f32 and f64, bool, char, explicit cast…
1.4
Control flow
Rust's if and loops look familiar, but they are expressions more
often than TypeScript developers expect. This theme covers if,
else if, loop, while, for, ranges, `brea…
Rust functions use explicit parameter and return types. Blocks can produce values, and the final expression has no semicolon. This is the first theme where a missing or extra semic…
Rust is learned with the compiler, not around it. Before ownership
starts, learners need the habit of reading error[E...], spans,
notes, and help: suggestions. Planned exercise…
2. Ownership & borrowing
5 themes · 45 exercises
Rust's core alien model. Moves, copies, references, mutable borrows,
slices, String vs &str, and enough lifetime intuition to make the
borrow checker feel like a set of rules rather than a personality.
2.1
Moves and Copy
TypeScript variables point at values managed by a garbage collector;
Rust bindings own values unless the type is Copy. This theme makes
moves concrete before references appear. P…
2.2
Shared borrowing
Borrowing is how Rust lets code inspect data without taking it. &T
references are shared, read-only views whose owner remains somewhere
else. Planned exercises: 1. choose `&Strin…
The borrow checker's headline rule is simple but unfamiliar: many
shared borrows or one mutable borrow, never both at the same time.
This theme teaches &mut T, reborrowing, and s…
Rust has owned strings (String) and borrowed string slices (&str).
The same borrowed-view idea applies to slices like &[T]. This theme
teaches the signature reflex: accept `&…
Lifetimes are not a separate runtime feature; they describe how long references are valid. This theme avoids advanced annotation syntax at first and focuses on why Rust rejects dan…
3. Data modeling
4 themes · 36 exercises
The Rust way to model domain data: structs with impl blocks, enums
as tagged unions, pattern matching, Option, and destructuring. This
is where TypeScript object and union habits become Rust algebraic data
types.
Rust separates data declarations from method implementations. A
struct names fields; an impl block attaches constructors and
methods. Planned exercises: 1. choose struct declar…
Rust enums are real sum types: each variant can carry different data. This is the closest Rust analogue to TypeScript discriminated unions, but the compiler enforces exhaustiveness…
3.3
Pattern matching
match is not a switch statement with nicer syntax. It destructures,
binds names, checks exhaustiveness, and returns values. Planned
exercises: 1. choose exhaustive match. 2. re…
Rust does not have null; absence is Option<T>. TypeScript users
already know T | null; Rust makes the check mandatory before access.
Planned exercises: 1. choose Option<T>.…
4. Collections & iteration
4 themes · 36 exercises
Practical data work in Rust. Vectors, hash maps, arrays, tuples, iterator adapters, closures, and the ownership rules that appear when collections hold or yield values.
5. Errors, crates & tests
4 themes · 36 exercises
The everyday shape of real Rust programs: Result, ?, custom error
enums, module boundaries, Cargo packages, visibility, and tests. The
learner moves from snippets to small crates.
Recoverable errors are values: Result<T, E>. The ? operator either
unwraps Ok(T) or returns the Err(E) early from the current function.
Planned exercises: 1. choose `Result…
Small Rust programs often use an enum for domain errors. This theme
teaches error variants, carrying context, Display, and using From
so ? can convert lower-level errors. Pla…
Rust modules are not files by accident; they are the visibility and
namespace system. This theme covers mod, use, pub, pub(crate),
and paths with crate:: and super::. P…
Cargo is Rust's build tool, package manager, test runner, and project
skeleton. This theme teaches Cargo.toml, crates, binaries vs
libraries, unit tests, integration tests, and `…
6. Traits & generics
4 themes · 36 exercises
Rust's abstraction toolkit. Traits, trait bounds, derives, generic
functions and types, associated types, impl Trait, and when dynamic
dispatch with trait objects is the right tradeoff.
Rust leans on a small set of common traits: Debug, Clone, Copy,
Default, PartialEq, Eq, PartialOrd, Ord, and Hash. Derive
is the idiomatic way to ask the compiler…
Rust has two styles of polymorphism: static dispatch with generics or
impl Trait, and dynamic dispatch with dyn Trait. This theme teaches
when each is appropriate and why trait…
7. Production Rust
5 themes · 45 exercises
The patterns that show up in code review: smart pointers, interior mutability, concurrency, async fundamentals, common standard-library traits, project layout, formatting, Clippy, and the edges where Rust asks for explicit tradeoffs.
7.1
Smart pointers
Smart pointers encode ownership strategies in types. This theme covers
Box<T> for heap allocation and recursive types, Rc<T> for shared
single-thread ownership, and Arc<T> fo…
Sometimes Rust permits mutation through a shared reference by moving
borrow checks to runtime. This theme teaches Cell, RefCell, and the
Rc<RefCell<T>> pattern as tools with…
Rust's ownership rules extend into concurrency. This theme covers
thread::spawn, move closures, JoinHandle, message passing with
channels, and shared state with `Arc<Mutex<T>…
7.4
Async basics
Rust async is explicit: async fn returns a future, .await yields
within an executor, and most real async code is runtime-specific. This
theme stays runtime-light and focuses on…
This final theme is the code-review survival kit: rustfmt, Clippy,
docs, Result in main, todo! vs unimplemented!, prelude habits,
and avoiding needless clone, unwrap,…
typeover · curriculum · pass 2
← back to home