This talk is structured in three sections to provide a complete understanding of Rust's core safety guarantees.
First, we will introduce the three major problems that systems programming has faced for decades and that Rust has set out to solve: Memory Leaks, Dangling Pointers, and Data Races. We will move beyond boring definitions by looking at real-world examples. For instance, we will look at a bug in the Godot game engine (Issue #101318), where a data race on the navigation map could freeze the entire engine—a class of bugs that is fundamentally prevented by the Rust compiler.
Second, we will cover the solution: Rust's three core concepts that work together to solve these issues. Using small, clear code snippets, we will explore Ownership, Borrowing, and Lifetimes. This section will show how Rust's design directly translates into safer code.
Finally, we will dig deep into how this is implemented behind the scenes in the rustc compiler. Understanding the compiler's logic helps build a very strong mental model, which not only solidifies these concepts but also enables you to think about how these safety principles could be applied elsewhere.
After this session, attendees will be able to:
Explain the root causes of memory leaks, dangling pointers, and data races.
Articulate how Rust's Ownership, Borrowing, and Lifetime rules prevent these issues at compile time.
Read Rust code and visualize how the borrow checker enforces its guarantees.
Build a strong mental model of rustc's safety checks, making it easier to debug compiler errors and write idiomatic Rust.