1. Foundations of Rust Memory Safety
Rust is a systems programming language that targets three goals at once: safety, speed, and concurrency. What distinguishes it from most peers is that it achieves memory safety wit...
Read full chapter →The essential Rust Programming cheat sheet: 8 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
Rust is a systems programming language that targets three goals at once: safety, speed, and concurrency. What distinguishes it from most peers is that it achieves memory safety wit...
Read full chapter →Rust offers two principal ways to compose custom data types: structs and enums. A struct groups related fields together, and Rust supports three flavors — named-field structs, tupl...
Read full chapter →Rust replaces the concept of `null` with the `Option` enum, which has two variants: `Some(T)` when a value is present and `None` when it is absent. Because `Option` is just an enum...
Read full chapter →Traits are Rust's mechanism for describing shared behavior. A trait declares a set of methods that a type must implement, much like an interface in object-oriented languages, and a...
Read full chapter →Iterators are the foundation of Rust's approach to sequences. Any type that implements the `Iterator` trait must provide a `next()` method returning `Option`: `Some(item)` while el...
Read full chapter →Rust organizes code using modules, declared with the `mod` keyword. A module is a namespace that can hold functions, structs, enums, constants, and other modules. Items inside a mo...
Read full chapter →Rust's concurrency story begins with `std::thread::spawn`, which takes a closure and returns a `JoinHandle`. Calling `.join().unwrap()` on the handle blocks the current thread unti...
Read full chapter →Beyond plain references, Rust offers smart pointers that own or manage data in more sophisticated ways. `Box` allocates a value on the heap and owns the only pointer to it. It is e...
Read full chapter →Done reading?
Test yourself with the Rust Programming practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →