typeover
rust curriculum
TS

RUST

Curriculum

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.

7 modules complete · 0 partial · 0 scaffolded 32/32 themes authored (100%) 288 exercises

Translation from TypeScript

variables.ts
let count: number = 5;
const PI = 3.14;

function double(n: number): number {
  return n * 2;
}
variables.go
count := 5
const PI = 3.14

func double(n int) int {
    return n * 2
}
Same intent, two syntaxes. typeover's whole shape is teaching the second one by leaning on what you already know about the first.

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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.

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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 `&…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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>.…

9 ready

begin →

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.

Vec<T> is Rust's growable array. This theme teaches vec![], push, indexing, .get, ownership of elements, and passing vectors by value or slice. Planned exercises: 1. choose…

9 ready

begin →

HashMap<K, V> replaces many TypeScript object-as-map patterns, but lookups return Option<&V> and insertion may move keys and values. Planned exercises: 1. choose HashMap. 2.…

9 ready

begin →

Idiomatic Rust often transforms data with iterators instead of manual indexing. The key ownership distinction is .iter(), .iter_mut(), and .into_iter(). Planned exercises: 1.…

9 ready

begin →

Rust closures look like compact TypeScript arrow functions, but they capture by borrow, mutable borrow, or move depending on use. Planned exercises: 1. choose closure syntax. 2. re…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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…

9 ready

begin →

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 `…

9 ready

begin →

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.

Traits describe behavior a type provides. They feel partly like TypeScript interfaces, but implementation is explicit and coherence rules decide where impls may live. Planned exerc…

9 ready

begin →

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…

9 ready

begin →

Rust generics are monomorphized and usually constrained with traits. TypeScript's generic syntax transfers conceptually, but Rust wants bounds where behavior is used. Planned exerc…

9 ready

begin →

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…

9 ready

begin →

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.

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…

9 ready

begin →

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…

9 ready

begin →

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>…

9 ready

begin →

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…

9 ready

begin →

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,…

9 ready

begin →

typeover · curriculum · pass 2

← back to home