Step Into Rust · Lesson 1 · Foundations
Hello, Rust
println!, variables, mutability, integer types and formatting.
- ~25 minreading and coding
- 4missions
- membersaccess
- Rustlanguage
Part of Step Into Rust. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
Rust compiles to native machine code like C, has no garbage collector and can call any C or Windows API. The difference is that its compiler proves many memory bugs impossible: use-after-free, double free, data races and most out-of-bounds writes. That is why Microsoft now writes parts of Windows in Rust, and why more and more security tooling is written in it.
In this lesson
- Why Rust, after C?
- Hello
- Variables are immutable by default
- Types
- Overflow is not silent
- Formatting
Missions
- Hello, Rust!
- Mutable on purpose
- Limits and wrap-around
- Think in hex and binary