Garbage Collection Without Unsafe Code
https://fitzgen.com/2024/02/06/safe-gc.htmlArticle
TL;DR
Proof-of-concept GC in 100% safe Rust works, but Gc<> wrapper types hurt ergonomics significantly.
Key Takeaways
- Gc<> forces types to bind to the GC allocator — migrating existing code is painful
- Proves the problem is solvable in safe Rust; future language features could fix the ergonomic gaps
- Multiple competing Rust GC projects exist with no consensus approach — fragmented ecosystem
Discussion
Top comments:
- [swiftcoder]: Neat proof that it’s solvable in safe Rust; ergonomics suffer but the door is open
- [the-smug-one]: Gc<> wrapper locks types to one allocator — trying a GC means rewriting all your types first
- [ltratt]: Too many Rust GC projects to track; no unified overview exists — ecosystem is fragmented
| Type | Link |
| Added | Apr 22, 2026 |
| Modified | Apr 22, 2026 |
| comments | 28 |
| hn_id | 47821853 |
| score | 86 |
| target_url | https://fitzgen.com/2024/02/06/safe-gc.html |