Systems Programming
Learn Rust through ownership, data modelling, and reliable program structure. Work with collections, errors, traits, and concurrency before combining them in a calculator and store engine.
What helps
Start with Rust Foundations if you are new to the language. Take time with ownership and borrowing before moving to collections, traits, and concurrency.
Rust pathway
Programming Foundations / Practice rooms / Track curriculum and enrollment
Rust Foundations
Rust looks familiar but is strict in ways that pay off later: values are immutable unless you say `mut`, every binding has a known type, and almost everything is an expression that produces a value. This project builds fluency with that core, bindings and shadowing, the integer and float types and their exact rules, booleans and chars, functions and expression blocks, control flow that returns values, and the compound types (tuples, arrays, slices), the ground every later project stands on.
- Bindings & Types: 5 lessons
- Arithmetic & Logic: 5 lessons
- Functions & Expressions: 5 lessons
- Control Flow: 5 lessons
- Compound Types: 5 lessons
Ownership & Borrowing
Passing a String or Vec by value moves ownership; Copy types behave differently. Borrow through references to keep ownership with the caller, use exclusive references for changes, and clone only when a separate owned value is needed. Practice these distinctions with text, vectors, slices and explicit reference lifetimes.
- Move Semantics: 5 lessons
- Borrowing: 5 lessons
- Mutable References: 5 lessons
- Clone & Copy: 5 lessons
- Slices & Lifetimes: 5 lessons
Structs & Methods
A struct names a bundle of related fields, and an `impl` block attaches behavior to it. This project builds the object-like core of Rust without inheritance: defining structs and constructing them, associated functions like `new`, methods that borrow `&self` to read or `&mut self` to change, the derive macros that grant `Clone` and equality for free, and composition, structs built from other structs, which is how real Rust models a domain.
- Defining Structs: 5 lessons
- Methods & Associated Functions: 5 lessons
- Mutating Methods: 5 lessons
- Derive & Equality: 5 lessons
- Composition: 5 lessons
Enums & Pattern Matching
An enum is a type whose value is exactly one of several named variants, and each variant can carry its own data. This is how Rust models choice precisely: a shape is a circle OR a rectangle, a result is success OR failure. `Option` and `Result` are just enums in the standard library. `match` forces you to handle every case, so whole classes of bug vanish, and `if let` / `while let` give you the concise version. This project builds fluency with enums, Option, Result, and the full power of pattern matching.
- Enums: 5 lessons
- Option: 5 lessons
- Result: 5 lessons
- Pattern Matching: 5 lessons
- if let & while let: 5 lessons
Error Handling
Represent absence with Option and recoverable failure with Result. Practice transformations, compatible ? propagation, named error variants and input validation. These types make failure visible; callers still choose whether to recover, propagate, panic or deliberately discard a value. Finish by composing integer parsing and overflow-resistant mean calculation.
- Option Combinators: 5 lessons
- Result Combinators: 5 lessons
- The ? Operator: 5 lessons
- Custom Error Types: 5 lessons
- Robust Functions: 5 lessons
Collections & Strings
The standard library's collections do the heavy lifting in real Rust. This project builds fluency with the three you reach for daily: the growable `Vec`, the owned `String` and its borrowed `&str` view, and the `HashMap` (plus `HashSet`) for keyed lookups and membership. You will build vectors, manipulate text, count word frequencies, sort and dedup, and combine sets, the bread-and-butter data wrangling that every program needs.
- Vectors: 5 lessons
- Strings: 5 lessons
- HashMaps: 5 lessons
- Sorting & Iterating: 5 lessons
- Sets & Text Wrangling: 5 lessons
Traits & Generics
Define shared behavior with traits, reuse it through defaults, and write generic functions with explicit bounds. Practice Display, From, Iterator and Ord, then combine different concrete types through trait objects. Static generics enable specialization; dynamic dispatch provides flexibility. Neither promises a particular execution speed.
- Defining Traits: 5 lessons
- Default Methods: 5 lessons
- Generics & Bounds: 5 lessons
- Standard Traits: 5 lessons
- Trait Objects: 5 lessons
Iterators & Closures
Closures capture context; iterators describe traversal and transformations one item at a time. Build map/filter pipelines, consume them with folds, combine them with zip and enumerate, and track state with scan. These abstractions can optimize well, but performance depends on the workload and compiler; this project verifies behavior, not speed.
- Closures: 5 lessons
- Adapter Methods: 5 lessons
- Consuming Adapters: 5 lessons
- Chaining Iterators: 5 lessons
- Advanced Pipelines: 5 lessons
Fearless Concurrency
Use threads, move captures, joins, channels and Arc<Mutex<T>> to coordinate owned data. Safe Rust combines borrowing with Send and Sync to prevent data races when unsafe dependencies uphold their contracts. You still must handle worker failures, close channels and avoid deadlocks or logical races. Compose small parallel patterns without assuming speedup or a particular schedule.
- Threads: 5 lessons
- Channels: 5 lessons
- Shared State: 5 lessons
- Parallel Patterns: 5 lessons
- Combining the Tools: 5 lessons
Capstone: Calculator & Store Engine
Compose a checked reverse-Polish calculator with an in-memory key-value store. Tokens and commands are enums; Store owns a HashMap; Result and Option express errors and missing values. A persistent Engine runs SET, GET, INCR, DEL and numeric PRINT lines, while run starts a fresh engine for each program. This interpreter combines parsing, arithmetic, state and error recovery; it does not claim to integrate every trait or concurrency exercise.
- Tokenizing: 5 lessons
- Evaluating RPN: 5 lessons
- The Key-Value Store: 5 lessons
- Commands: 5 lessons
- The Engine: 5 lessons