← All courses

Rust by Example

The official MIT/Apache-2.0 tour of Rust by worked examples — primitives, custom types, flow control, closures, generics, traits, ownership, error handling, and collections. Drills lift each example's load-bearing function and let the learner fill it in.

  • Rust
  • 26 lessons
  • ~5 hours
  • Free
  • by The Rust Project

Learn Rust for free on Libre Academy with the Rust by Example course: 26 interactive lessons you complete by writing real code in a built-in editor, graded instantly by hidden tests. No paywall, no sign-up — it runs in your browser and the free desktop app.

What you get

  • Hands-on lessons with a real editor and instant, test-graded feedback.
  • Free and open source — no account required to start.
  • Runs in your browser, and offline in the free desktop app.
  • Rust runs via a hosted playground.

What's inside

  • Hello, World, Primitives, and Tuples
  • Custom Types: Structs and Enums
  • Flow Control: if/else, loops, and match
  • Functions, Closures, and Higher-Order Functions
  • Generics and Traits
  • Ownership, Borrowing, and Lifetimes
  • Error Handling: Option and Result
  • Collections, Strings, and the Heap

Start Rust by Example free →   More free Rust courses