







The Rust programming language is well known for its ownership-based type system, which offers strong guarantees like memory safety and data race freedom. However, Rust also provides unsafe escape hatches, for which safety is not guaranteed automatically and must instead be manually upheld by the programmer. This creates a tension. On the one hand, compilers would like to exploit the strong guarantees of the type system—particularly those pertaining to aliasing of pointers—in order to unlock powerful intraprocedural optimizations. On the other hand, those optimizations are easily invalidated by “badly behaved” unsafe code. To ensure correctness of such optimizations, it thus becomes necessary to clearly define what unsafe code is “badly behaved.” In prior work, Stacked Borrows defined a set of rules achieving this goal. However, Stacked Borrows rules out several patterns that turn out to be common in real-world unsafe Rust code, and it does not account for advanced features of the Rust borrow checker that were introduced more recently. To resolve these issues, we present Tree Borrows . As the name suggests, Tree Borrows is defined by replacing the stack at the heart of Stacked Borrows with a tree. This overcomes the aforementioned limitations: our evaluation on the 30 000 most widely used Rust crates shows that Tree Borrows rejects 54% fewer test cases than Stacked Borrows does. Additionally, we prove (in Rocq) that it retains most of the Stacked Borrows optimizations and also enables important new ones, notably read-read reorderings.
Place Capability Graphs: A General-Purpose Model of Rust’s Ownership and Borrowing Guarantees
Rust’s novel type system has proved an attractive target for verification and program analysis tools, due to the rich guarantees it provides for controlling aliasing and mutability. However, fully understanding, extracting and exploiting these guarantees is subtle and challenging: existing models for Rust’s type checking either support a smaller idealised language disconnected from real-world Rust code, or come with severe limitations in terms of precise modelling of Rust borrows, composite types storing them, function signatures and loops.
Help Wanted: Research Questions in Rust - Aaron Turon - OPLSS 2018
Enabling the next iteration of the borrow checker on nightly | Rust Blog
Empowering everyone to build reliable and efficient software.

“Implementation Selection” in Rust — Andrew Lilley Brinker
Exploring options for selecting branching paths in Rust code at compile time and runtime.

Ownership is a fundamental piece of Rust’s story. It amounts to a tight set of rules about who owns a value in a program, how that value can be aliased and mutated, and when that value is dropped. It prevents shared mutable state, which is the root cause of major bugs in software written without the same guarantees.
lambek - Rust
Lambek is a library that enables type-level programming in stable Rust, supporting advanced features including higher kinded types, higher ranked types, and constraint kinds. Although Rust do not natively support these features, Lambek uses techniques including defunctionalization and CPS transformation to emulate these features in Rust.
kyju.org
Horribly misusing Rust features to provide provable memory safety and tracing garbage collection for pointer soup.
Rust traits and dependency injection - Julio Merino (jmmv.dev)
Dependency injection is one of my favorite design patterns to develop highly-testable and modular code. Unfortunately, applying this pattern by taking Rust traits as arguments to public functions has …
How Our Rust-to-Zig Rewrite is Going
For the past year and a half, the team building Roc's compiler has been rewriting our 300,000 lines of Rust code into Zig, for reasons I'll recap below. We recently passed an exciting milestone: feature parity with the original compiler!
The Rust Programming Language - The Rust Programming Language
by Steve Klabnik, Carol Nichols, and Chris Krycho, with contributions from the Rust Community
iddqd, or the hardest kind of unsafe Rust | Oxide Computer Company
How our Rust collections library defends against adversarial trait implementations.

Why Use Structured Errors in Rust Applications?
Going against the common wisdom of “using anyhow for applications”.
Segfaults are our friends and teachers
This afternoon, I got a segmentation fault in a Rust program, and was confused. This is Rust, I shouldn’t get segfaults! I quickly checked the couple of places I used unsafe, and they were either calling C functions (and checking the errors), or telling the compiler not to initialize some memory because I was going to write into it unconditionally before reading from it.