Learnr

Learn Rust

Make sense of ownership and the borrow checker, one small lesson at a time.

or browse all courses.

Free to start. Built from a single prompt. No credit card.

Rust is a compiled systems language that gives you C-level performance without a garbage collector, while preventing whole classes of memory bugs at compile time. It does this through ownership: every value has one owner, and references are checked by the borrow checker so data cannot be freed while still in use or mutated from two places at once. Rust is used in browsers, command-line tools, embedded devices, WebAssembly and parts of the Linux kernel. Learnr builds you a personalized Rust course from one prompt and teaches it through short, interactive lessons that take ownership slowly.

How to learn Rust, step by step

  1. Install rustup and use Cargo from day one. Install Rust with rustup, then create projects with cargo new and run them with cargo run. Cargo handles building, testing and dependencies, so learn its commands before anything fancy.
  2. Read The Rust Programming Language book. The free official book, often called the Rust Book, is the standard beginner path. Pair each chapter with the Rustlings exercises, which give you small broken programs to fix.
  3. Take ownership and borrowing slowly. Learn the three ownership rules, what a move is, and the difference between &T and &mut T. When the borrow checker complains, read the full error; Rust compiler messages usually explain the fix.
  4. Use enums, match and Result everywhere. Rust has no null and no exceptions. Practice Option and Result with match, if let and the ? operator until handling the failure case feels routine rather than annoying.
  5. Learn traits, generics and iterators. Implement traits like Display for your own types, write generic functions with trait bounds, and chain iterator adapters like map, filter and collect instead of manual index loops.
  6. Build a real command-line tool. Write a grep clone, a to-do CLI or a file organizer using crates like clap and serde, and run cargo clippy for advice. A short Learnr lesson each day helps ownership rules settle in.

What you'll learn

  • Explain ownership, moves, borrowing and lifetimes in your own words
  • Model data with structs, enums and pattern matching
  • Handle errors with Result, Option and the ? operator
  • Write generic code with traits and trait bounds
  • Build, test and manage dependencies with Cargo

What's inside your Rust course

A sample path Learnr builds for Rust. Your real course adapts to your goal and level.

  • 1. Cargo, crates and your first Rust program
  • 2. Variables, mutability and core types
  • 3. Ownership, borrowing and slices
  • 4. Structs, enums and match
  • 5. Error handling, traits and generics
  • 6. Collections, iterators and a complete CLI project

How long does it take to learn Rust?

Coming from another language, expect 1 to 2 months at 5 to 8 hours a week before ownership stops feeling like a fight, and 3 to 6 months to write confident, idiomatic Rust. Async Rust and advanced lifetimes take longer. As a first language, Rust is slower going.

What you need before you start

Experience in at least one other language is strongly recommended. Some understanding of the stack and the heap, from C or C++ or a computer science course, makes ownership easier to grasp.

Common mistakes to avoid

  • Cloning everything to silence the borrow checker. It works at first, but learn to borrow with references so you understand what the compiler is protecting.
  • Calling unwrap() on every Result and Option. Use ? to propagate errors and reserve unwrap for cases you can prove will never fail.
  • Starting with lifetimes-heavy data structures like linked lists. Begin with owned data and simple programs; tricky lifetimes make more sense later.

How Learnr builds your course

Type your topic

Tell Learnr you want to learn Rust, or get as specific as you like.

Get a personalized course

Learnr instantly builds a full Rust course tailored to your goal and skill level.

Learn and level up

Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.

Rust questions, answered

Is Rust hard to learn?

It has a steeper start than most languages, mainly because of ownership and the borrow checker. Once those concepts click, the compiler becomes a helpful guide that catches bugs other languages miss.

Should I learn Rust or Go?

Go is quicker to learn and suits web services and cloud tools. Rust offers more control and performance with no garbage collector, suiting systems, embedded and performance-critical work.

What can I build with Rust?

Command-line tools, web servers, WebAssembly modules for the browser, game prototypes, embedded firmware and system utilities. Many popular developer tools today are written in Rust.

Explore more courses

More programming and tech courses

See all programming and tech courses

Ready to learn Rust?

Start your free, personalized Rust course in seconds. .