Garbage Collection for Rust: The Finalizer Frontier
summary
Alloy implements a conservative, retrofit tracing GC for Rust that reuses existing drop methods as finalizers where safe, using a compiler pass called finalizer safety analysis to reject unsafe destructors; it adds finalizer elision and premature finalizer prevention to optimize and preserve soundness. Evaluation converts mature Rust programs, reports about 10% runtime slowdown and roughly 1–2x heap use with default settings, and ships artifacts and an evaluated archive.
AI-written summary · about
chapters (8)
- 0:00Garbage collection in Rust
- 1:46Demo: ref-counting vs GC
- 3:52Alloy’s GC vs prior art
- 4:33Conservative GC approach
- 7:44Retrofitting GC into Rust
- 9:10Finalization challenges
- 10:55Finalizer safety in action
- 13:02Q&A on polymorphic types








