explaingit

mainmatter/100-exercises-to-learn-rust

9,303RustAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A structured course of 100 hands-on exercises for learning the Rust programming language from scratch, aimed at programmers who have some coding background but no prior Rust experience.

Mindmap

mindmap
  root((100 Rust Exercises))
    Structure
      100 exercises
      Incremental steps
      Solutions branch
    What you learn
      Rust basics
      Ownership
      Borrow checker
    Setup
      rustup install
      IDE extension
      rust-exercises.com
    Audience
      Rust beginners
      General programmers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Work through 100 progressive coding exercises to learn Rust step by step without a classroom.

USE CASE 2

Check the solutions branch when stuck to see the correct approach and understand why it works.

USE CASE 3

Use as a self-paced Rust curriculum where compiler errors guide you toward the right answer.

Tech stack

Rust

Getting it running

Difficulty · easy Time to first run · 30min

Requires rustup to install Rust, an IDE with Rust autocompletion such as RustRover or VS Code with the Rust extension is recommended.

Free to use for non-commercial purposes with attribution, under a Creative Commons license.

In plain English

This repository is a structured course for learning the Rust programming language from scratch through 100 hands-on exercises. Rust is a systems programming language known for being fast and for catching many categories of software bugs before the program even runs, but it has a reputation for a steep learning curve. This course is designed to reduce that friction by breaking the learning process into small, incremental steps. The course is aimed at people who have heard of Rust but have not yet written any of it. You do not need prior experience with Rust specifically, though the course assumes some general programming background. By the end, the goal is that you can start writing your own Rust programs. To get started, you visit rust-exercises.com and follow the setup instructions there. You need Rust installed on your machine, which you get via a tool called rustup. An IDE with Rust autocompletion is optional but recommended, the README suggests RustRover or Visual Studio Code with a specific extension. Solutions to all 100 exercises are available in a separate branch of the same repository, so you can check your work or get unstuck without leaving GitHub. The course was written by Mainmatter, a software consulting firm that offers Rust training and consulting as a commercial service. The course content itself is released under a Creative Commons license that allows non-commercial use with attribution.

Copy-paste prompts

Prompt 1
I'm working through the mainmatter 100-exercises-to-learn-rust course and stuck on a borrow checker error. Here's my code, explain what the borrow checker wants and how to fix it.
Prompt 2
I want to start the 100 Rust exercises. Walk me through installing rustup, cloning the repo, and running the first exercise so I see the test output.
Prompt 3
I finished a Rust exercise but my solution differs from the one in the solutions branch. Which approach is more idiomatic Rust and why?
Prompt 4
I'm halfway through the 100 Rust exercises. What key concepts, ownership, lifetimes, traits, should I make sure I've truly understood before moving to the harder exercises?
Open on GitHub → Explain another repo

← mainmatter on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.