SRS Badger

Rust: the basics

4 chapters · 14 problems

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

  1. Foundations
    6 problems

    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…

  2. Ownership & Borrowing
    5 problems

    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…

  3. Structs
    2 problems

    Defining Structs Structs group related data. Fields are named and typed. Method Syntax Methods live in impl blocks. &self borrows the struct.

  4. Enums & Pattern Matching
    1 problem

    Enums Enums can hold data in each variant. Match match must be exhaustive. Option<T Rust's replacement for null. Some(T) or None.