Getting started
These ten lessons put a toolchain on the machine and a first program through it. They cover what Rust is and where it runs, the install pages of the three systems and rustup, the edit-build-run loop with cargo and gdb, and the first program that rustc builds. The diagnostics and their error codes follow, then a crate and a module, the types and the operators, conditions and loops, and the functions that the rest of the course is written with.
1.1
What Rust is and where it runs
the language, memory safety without a collector, the native binary, rustc and cargo, a first build, a move the compiler refuses (C++ 001)
Open
1.2
Install Rust on Linux, macOS and Windows
the packages per system and the install pages, rustup in words, PATH, the version this course uses and a first compile (C++ 001, 002)
Open
1.3
An editor, cargo and gdb
the edit-build-run loop, rustc diagnostics while writing, cargo check, gdb in batch mode and what this toolchain lacks (C++ 003)
Open
1.4
Your first Rust program
hello.rs line by line, rustc, the exit status, a missing semicolon and the same program under cargo (C++ 004)
Open
1.5
Warnings, errors and rustc's suggestions
unused names, unused mut, unreachable code, --deny warnings and the error codes E0308 and E0425 read in full (C++ 005)
Open
1.6
A crate, a module and separate compilation
one file is a crate, mod and use, pub and privacy, files beside main.rs and the errors E0603 and E0432 (C++ 006, 015, 131)
Open
1.7
Variables, mutability and types
let, mut, shadowing, integers, floats, bool, char, inference, const and static, overflow in debug and release (C++ 007)
Open
1.8
Operators, comparisons and bool
arithmetic, integer division, remainder, comparisons, short-circuit logic, bit masks, precedence and as casts (C++ 008)
Open
1.9
Conditions, loops and labels
if as an expression, loop that returns a value, while, for over ranges, break and continue with labels (C++ 009)
Open
1.10
Functions and expressions
fn, parameters and return types, statements against expressions, early return, no overloading and ExitCode from main (C++ 010, 013)
Open