Skip to main content

Learn Rust, one checkpoint at a time

5 guided lessons, 15 steps. You write the code in a live editor and each checkpoint ticks itself the moment the real compiler agrees with you. There is nothing to submit and no sign-up.

Rust is compiled ahead of time, so mistakes surface before anything runs and the feedback you get here is the same feedback rustc gives on your own machine.

  1. Lesson 1Start here6 min · 3 steps

    Your first Rust program

    Write a main function, print with a macro, and understand what the compiler did.

  2. Lesson 2Core idea10 min · 3 steps

    Ownership without the fear

    See a move happen, break the program on purpose, then fix it two different ways.

  3. Lesson 3Core idea10 min · 3 steps

    Make the borrow checker your friend

    Shared borrows, one mutable borrow, and why the rule exists at all.

  4. Lesson 4Going further12 min · 3 steps

    Structs, traits and behaviour

    Model data with a struct, give it behaviour with a trait, print it nicely.

  5. Lesson 5Going further12 min · 3 steps

    Handling things that can fail

    Option, Result and the `?` operator — errors as ordinary values.

Prefer to read finished programs instead? Browse the runnable examples.