$_
StemLegacy
  • Courses
  • About
  • FR
🦀

Learn Rust

20 lessons to master Rust — from installation to publishing your first crate.

1

Getting started

Install Rust, write your first program, and learn the basics.

1

Installing Rust

rustup, cargo, rustc

2

Hello, World!

cargo new, cargo run

3

Variables and types

let, mut, const, types

4

Functions and control flow

fn, if, loop, match

✦

Memory Safety

Why Rust prevents memory bugs at compile time

2

Ownership & borrowing

Understand Rust's unique memory model.

5

Ownership

move, copy, drop

6

References and borrowing

&, &mut, borrowing rules

7

Slices

&str, &[T], string slices

8

Lifetimes

'a, lifetime annotations

✦

Stack vs Heap

How Rust manages memory allocation

3

Data structures

Structs, enums, Option, Result and collections.

9

Structs

struct, impl, methods

10

Enums and pattern matching

enum, match, if let

11

Option and Result

Option<T>, Result<T,E>, ?

12

Collections

Vec, HashMap, iterators

✦

Rust vs C/C++

Comparing memory safety approaches

4

Code organization

Modules, traits, generics and error handling.

13

Modules and crates

mod, use, pub, crate

14

Traits

trait, impl, dyn

15

Generics

<T>, where, bounds

16

Error handling

Result, ?, custom errors

✦

Zero-cost abstractions

How Rust gives safety without runtime cost

5

Practical project

Build a real CLI tool from scratch.

17

File I/O

std::fs, read, write

18

Building a CLI tool

clap, args, subcommands

19

Testing

#[test], assert, cargo test

20

Publishing

cargo publish, docs, crates.io

$_
StemLegacy
A >/GatherHub site

© 2026 StemLegacy