Trivial example of safety in Rust
To understand how Rust’s memory safety works and what it gives you, we look at a trivial example of the Rust compiler enforcing memory safety.
This article is Part 6 in a 7-Part Series.
- Part 1 - Should I use Rust?
- Part 2 - Is Rust popular enough?
- Part 3 - Is Rust safe?
- Part 4 - Is Rust fast?
- Part 5 - Is Rust difficult to learn?
- Part 6 - This Article
- Part 7 - Getting started with Rust
Earlier in this series we’ve learned that Rust is popular, and gives us both important memory safety and high performance, and that learning it is tractable for systems programmers.
The most important of all of those was Rust’s safety guarantees.
To give you a high-level executive understanding of what Rust’s safety actually means, in this video, I show a trivial example that I think gives the right mental model of what the Rust compiler does for memory safety and thus how it helps big systems projects.
This article is Part 6 in a 7-Part Series.
- Part 1 - Should I use Rust?
- Part 2 - Is Rust popular enough?
- Part 3 - Is Rust safe?
- Part 4 - Is Rust fast?
- Part 5 - Is Rust difficult to learn?
- Part 6 - This Article
- Part 7 - Getting started with Rust