Learning paths · Skills · Intermediate

Rust: ownership and what it buys you

How Rust's ownership and borrowing rules give memory safety without a garbage collector, how traits, enums and iterators stay zero-cost, and how the same rules make threads and async code safe.

0 of 12 done

The map

  • Not started
  • In progress
  • Done
  1. 01OwnershipMoves, borrows, lifetimes, the heap0/5
  2. 02Types that do the workEnums, errors, traits, iterators0/4
  3. 03Beyond one threadSend and Sync, async, unsafe0/3
  4. 04Next: system designSame ideas, at service scale

Everything here is about stable Rust and the 2024 edition (Rust 1.85 and later). The examples were compiled and run on the official Rust Playground with Rust 1.99.1 and, for the async topic, Tokio 1.53. Where a feature is newer than the 2024 edition (let chains in 1.88, for example) the topic says so.

Where this path leads