Alloy: Garbage Collection for Rust Using Existing Destructors as Finalizers
By
ltratt
A five-star bake. Worth schmearing, sharing, saving.
Summary
This academic paper presents Alloy, a novel garbage collection system for Rust that allows existing Rust destructors to be automatically used as GC finalizers. Unlike previous approaches, Alloy integrates better with existing Rust code but introduces challenges with soundness and performance. The paper provides solutions including finalizer safety analysis to reject unsound destructors, finalizer elision to optimize away unnecessary finalizers, and premature finalizer prevention to ensure safe execution.
Key quotes
· 4 pulledAlloy allows existing Rust destructors to be automatically used as GC finalizers
Alloy integrates better with existing Rust code than previous solutions but introduces surprising soundness and performance problems
Finalizer safety analysis rejects unsound destructors from automatically being reused as finalizers
Premature finalizer prevention ensures that finalizers are only run when it is provably safe to do so
You might also wanna read
Rust is not for every project: A critical look at the hype behind Amazon, Cloudflare, and Discord's adoption
The article critically examines the hype around Rust programming language, arguing that while Rust has strengths in safety and performance,
A Grounded Conceptual Model for Ownership Types in Rust Programming
This article presents a grounded conceptual model for ownership types in Rust, the programming language known for memory safety without garb
Dynamic Borrow-Checking in a Toy Programming Language: Implementing Rust-like Memory Safety Without Static Types
This article presents a demonstration of a toy programming language that implements borrow-checking without static type-checking. The langua
C++26 Standard Draft Finalized with Reflection, Memory Safety, Contracts, and New Concurrency Framework
The C++26 standard draft has been completed, introducing major new features including reflection capabilities that allow C++ to describe its
Rail: A Self-Hosting Systems Programming Language with Pure-Rail TLS 1.3 Implementation
Rail is a self-hosting systems programming language that compiles itself without any C dependencies. The compiler is written in Rail and pro
Understanding Fil-C: A Simplified Model of Memory-Safe C/C++ Implementation
The article presents a simplified model of Fil-C, a memory-safe implementation of C/C++. It explains that while the real Fil-C uses a compil
