explaingit

rust-lang/rustlings

🔥 Hot62,867RustAudience · vibe coderComplexity · 1/5ActiveLicenseSetup · easy

TLDR

A collection of small, hands-on coding exercises to learn Rust by writing real code. Work through bite-sized problems to build familiarity with Rust's memory safety concepts.

Mindmap

mindmap
  root((repo))
    What it does
      Small exercises
      Learn by coding
      Memory safety focus
    How to use
      Companion to Rust book
      Work through sequentially
      Quick to complete
    Topics covered
      Variables and types
      Ownership and borrowing
      Pattern matching
      Error handling
    Audience
      Rust beginners
      Self-paced learners
      Hands-on practitioners

Things people build with this

USE CASE 1

Work through structured exercises to learn Rust fundamentals without building a full project from scratch.

USE CASE 2

Practice Rust syntax and concepts like ownership, borrowing, and pattern matching with immediate feedback.

USE CASE 3

Supplement reading the official Rust book with hands-on coding to reinforce what you've learned.

Tech stack

Rust

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice and license text.

In plain English

Rustlings is a collection of small coding exercises designed to help beginners learn Rust by actually writing and reading Rust code. Rust is a programming language known for strict memory safety rules that can feel unfamiliar at first, and Rustlings gives you a hands-on way to build familiarity with those concepts one small exercise at a time. The README recommends using it alongside the official Rust book, meaning it works best as a companion to reading rather than a standalone course. Each exercise is small enough to complete quickly, making it approachable for people just starting out. The topics list it as beginner-friendly, and it is maintained by the official Rust language organization.

Copy-paste prompts

Prompt 1
I'm learning Rust and want to practice with small exercises. How do I set up and run rustlings on my machine?
Prompt 2
Show me how to solve the rustlings exercise about ownership and borrowing in Rust.
Prompt 3
I'm stuck on a rustlings exercise about error handling. What does the ? operator do in Rust?
Prompt 4
Walk me through the pattern matching exercises in rustlings and explain match statements.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.