Complete course

Learn Rust—don't be an otter.

A step-by-step guide to mastering the most effective way to use memory.

Your progress

0%Haven't you started yet?

Start Learn Rust—don't be an otter.
  1. Before RustOptional

    An optional start if you need a refresher on terminals, variables, functions and compilation.

    3 lessons
    1. –.1Programs and compilationAvailable12 min
    2. –.2The terminal without fearAvailable12 min
    3. –.3Variables, functions and control flowAvailable18 min
  2. 00

    Setup and mental model

    Install Rust, meet Cargo and understand the kind of problems the language is built to solve.

    4 lessons
    1. 0.1What Rust is trying to solveAvailable20 min
    2. 0.2Installation and toolingAvailable20 min
    3. 0.3Your first Cargo projectAvailable25 min
    4. 0.4How to read the compilerAvailable20 min
  3. 01

    Syntax and control flow

    Variables, types, expressions, functions and the structures used in every program.

    4 lessons
    1. 1.1Variables, mutability and typesComing soon20 min
    2. 1.2Expressions and functionsComing soon20 min
    3. 1.3Conditions and loopsComing soon20 min
    4. 1.4Basic macrosComing soon20 min
  4. 02

    Ownership and borrowing

    Make memory visible to understand moves, Copy, Clone, references and borrowing.

    4 lessons
    1. 2.1Ownership and movesIn preparation25 min
    2. 2.2References and borrowingComing soon25 min
    3. 2.3Slices, String and UTF-8Coming soon25 min
    4. 2.4Designing signatures with ownershipComing soon25 min
  5. 03

    Structs, enums and patterns

    Model valid states with types and exhaustive pattern matching.

    4 lessons
    1. 3.1Structs, methods and SelfComing soon20 min
    2. 3.2Data-carrying enums and OptionComing soon20 min
    3. 3.3Exhaustive pattern matchingComing soon20 min
    4. 3.4Making invalid states impossibleComing soon20 min
  6. 04

    Collections, text and errors

    Work with real data and handle absence, failure and UTF-8 text explicitly.

    4 lessons
    1. 4.1Vectors and mapsComing soon20 min
    2. 4.2String, str, bytes and charsComing soon20 min
    3. 4.3Option, Result and the ? operatorComing soon20 min
    4. 4.4Error designComing soon20 min
  7. 05

    Crates, testing and documentation

    Organize a codebase, define its API and prove that it keeps working.

    4 lessons
    1. 5.1Modules, crates and visibilityComing soon20 min
    2. 5.2Dependencies, SemVer and featuresComing soon20 min
    3. 5.3Unit, integration and doc testsComing soon20 min
    4. 5.4rustdoc, Clippy and CIComing soon20 min
  8. 06

    Traits, generics and iterators

    Build abstractions without losing control over types, costs or behavior.

    4 lessons
    1. 6.1Traits and boundsComing soon20 min
    2. 6.2Generics, impl Trait and dyn TraitComing soon20 min
    3. 6.3Closures and capturesComing soon20 min
    4. 6.4Iterators and compositionComing soon20 min
  9. 07

    I/O and CLI applications

    Read, transform and write data in a maintainable terminal application.

    4 lessons
    1. 7.1Arguments, input and outputComing soon20 min
    2. 7.2Files, paths and buffersComing soon20 min
    3. 7.3Serde and configurationComing soon20 min
    4. 7.4Designing a testable CLIComing soon20 min
  10. 08

    Smart pointers and interior mutability

    Choose Box, Rc, Arc, Cell or RefCell for their guarantees, not by habit.

    4 lessons
    1. 8.1Box, Deref and DropComing soon20 min
    2. 8.2Rc, Arc and WeakComing soon20 min
    3. 8.3Cell, RefCell, Mutex and RwLockComing soon20 min
    4. 8.4Trees, graphs and arenasComing soon20 min
  11. 09

    Concurrency and async

    Transfer ownership between tasks and design concurrency with clear boundaries.

    4 lessons
    1. 9.1Threads and channelsComing soon20 min
    2. 9.2Send, Sync and shared stateComing soon20 min
    3. 9.3Futures and async/awaitComing soon20 min
    4. 9.4Cancellation and backpressureComing soon20 min
  12. 10

    Idiomatic Rust and API design

    Move from making it compile to designing APIs that express invariants.

    4 lessons
    1. 10.1Types that express invariantsComing soon20 min
    2. 10.2Builders and typestateComing soon20 min
    3. 10.3Composition and patternsComing soon20 min
    4. 10.4Designing a public APIComing soon20 min
  13. 11

    Unsafe, FFI and no_std

    Understand the obligations that appear when you step outside safe guarantees.

    4 lessons
    1. 11.1Unsafe contractsComing soon20 min
    2. 11.2Raw pointers and layoutComing soon20 min
    3. 11.3Safe FFI with CComing soon20 min
    4. 11.4core, alloc and no_stdComing soon20 min