Rust Programming Course

A comprehensive, free course taking you from zero Rust knowledge to building production applications. Follow the chapters in order for the best learning experience.

45 chapters Beginner to Advanced
01

What is Rust?

Why Rust exists, what problems it solves, and who uses it — no jargon, just plain English.

3 lessons
02

Installing Rust

Get Rust running on your computer in 5 minutes — step by step with screenshots in your head.

2 lessons
03

Hello, World!

Write your very first Rust program. Yes, it is that easy.

2 lessons
04

Cargo — Your Best Friend

Cargo builds, runs, and manages your Rust projects. Think of it as your personal assistant.

3 lessons
05

Variables & Mutability

Variables are labeled boxes. Learn why Rust locks them by default and how to unlock them.

3 lessons
06

Data Types — Numbers

Integers, floats, and why Rust makes you pick the exact size of your numbers.

3 lessons
07

Data Types — Text & More

Characters, booleans, strings, tuples, and arrays — all the building blocks.

3 lessons
08

Functions

Package code into reusable pieces. Like recipes you can call by name.

3 lessons
09

Comments & Documentation

Leave notes in your code so future-you (and teammates) know what is going on.

1 lesson
10

Control Flow — If/Else

Make decisions in your code: "if this, do that, otherwise do something else."

1 lesson
11

Control Flow — Loops

Repeat things: loop forever, loop while something is true, or loop through a list.

1 lesson
12

Ownership — The Big Idea

THE concept that makes Rust special. Like lending books — every value has exactly one owner.

2 lessons
13

Ownership — Move & Copy

When you hand a value to someone, do they get a photocopy or the original? Rust cares.

2 lessons
14

References & Borrowing

Instead of giving away your stuff, just let someone look at it. That is borrowing.

2 lessons
15

Slices

Point to a piece of a collection without copying it. Like bookmarking a page range.

1 lesson
16

Structs — Custom Data Types

Create your own data shapes. Like designing a form with fields you choose.

1 lesson
17

Struct Methods & impl Blocks

Give your structs superpowers by attaching functions to them.

1 lesson
18

Enums — Multiple Choices

A value that can be one of several options. Like a dropdown menu in code.

1 lesson
19

Pattern Matching with match

The Swiss Army knife of Rust — inspect values and act on every possible case.

1 lesson
20

The Option Type — No More Null

A box that might be empty or might have something inside. Rust's elegant fix for null.

1 lesson
21

Error Handling with Result

Things can go wrong. Result says "here is the answer" or "here is what went wrong."

1 lesson
22

Error Handling in Practice

Custom errors, the ? shortcut, and when it is OK to just crash.

1 lesson
23

Vectors — Growing Lists

A list that can grow and shrink. The most common collection in Rust.

1 lesson
24

Strings — Text in Rust

String vs &str, UTF-8, and why text is surprisingly tricky.

1 lesson
25

HashMaps — Key-Value Storage

Store data by name, like a dictionary or phone book.

1 lesson
26

Generics — One Size Fits All

Write code that works with any type. Like a cookie cutter that works with any dough.

1 lesson
27

Traits — Shared Behavior

Define what something CAN DO, not what it IS. Like job descriptions.

1 lesson
28

Trait Objects & Dynamic Dispatch

When you don't know the exact type at compile time — and that is fine.

1 lesson
29

Lifetimes — The Basics

Tell the compiler how long references live. Scary name, simple idea.

1 lesson
30

Lifetimes in Practice

Lifetime elision, structs with references, and the rules that save you typing.

1 lesson
31

Closures — Functions on the Go

Mini-functions you create on the fly. Like sticky notes with instructions.

1 lesson
32

Iterators — Processing Sequences

Walk through collections one item at a time with map, filter, and friends.

1 lesson
33

Modules & Packages

Organize your code into folders and files like a well-organized filing cabinet.

1 lesson
34

Crates & Cargo Advanced

Workspaces, feature flags, and publishing your own crate for the world to use.

1 lesson
35

Testing Your Code

Write tests that check your code works. Run them with one command.

1 lesson
36

Integration Tests & Organization

Test your whole program, organize tests, and make sure everything works together.

1 lesson
37

Smart Pointers — Box

Store data on the heap. Like renting a storage unit for big items.

1 lesson
38

Smart Pointers — Rc & Arc

Multiple owners for one value. Like a shared Netflix account.

1 lesson
39

Interior Mutability — RefCell

Break the rules (safely) when you need to mutate something behind a shared reference.

1 lesson
40

Concurrency — Threads

Do multiple things at once. Like having extra hands to help with chores.

1 lesson
41

Concurrency — Channels & Shared State

Threads talking to each other via messages or sharing data with locks.

1 lesson
42

Async/Await — Asynchronous Rust

Order food and do other stuff while waiting. That is async programming.

1 lesson
43

Unsafe Rust

Sometimes you need to take off the training wheels. Here is how to do it carefully.

1 lesson
44

Macros — Code That Writes Code

Automate repetitive patterns. Macros are your copy-paste robot.

1 lesson
45

Building a Real Project

Put it all together: build a CLI tool and a web API. You are a Rust developer now.

2 lessons