Rust Gets a Garbage Collector

1 day ago 2
 Garbage Collector (credits 123RF)
Image: Garbage Collector (credits 123RF)

Hello, Rustaceans

Hope you’re having a great Techtober, here’s to a fantastic finish this week!

In this issue, we’ll discuss a paper on garbage collection in Rust, present you a Rust challenge, spotlight an amazing Rust project, and share 10 incredible links of the week.

Here’s issue 90 for you!

A couple of weeks ago, Jacob Hughes and Laurence Tratt from soft-dev.org published an eyebrow-raising paper titled “Garbage Collection for Rust: The Finalizer Frontier”.

Truth be told, the Rust community’s reaction was split, equal parts curiosity, skepticism, and spirited debate from die-hard Rustaceans.

Because here’s the thing: mention “GC” in Rust circles and that’s a sure way to start a theological debate.

The controversy in 3 Acts

Act I: The Purists.
They’ll tell you Rust’s superpower is not needing a GC, safety and performance, thank you very much. Adding one, they argue, is like duct-taping a leaf blower to a Tesla: loud, unnecessary, and definitely missing the point.

Act II: The Pragmatists.
They don’t want a language-wide collector. They want library-level GC, for specific problem domains, language runtimes, graph-like data structures, GUIs, and game engines. Basically, a way to clean up messy object graphs without giving up safety or rewriting your renderer in C++.

Act III: The Philosophers.
They argue this isn’t about garbage collection at all, it’s about Rust’s identity. If ownership and borrowing are its soul, adding GC feels like whispering, “Maybe Go was right.”

The proposed approach isn’t your typical stop-the-world collector. It’s more like a “bring-your-own-runtime” model - similar to async in Rust - where the language provides hooks (stack scanning, tracing support), but the actual collector lives in user space.

Think optional, opt-in, and (theoretically) zero interference with your non-GC’d code. In practice, it’s meant for people building things like JS interpreters or theorem provers - places where circular references are more feature than bug.

For some, GC-for-Rust sounds like heresy. For others, it’s a practical step toward making Rust truly general-purpose - where “systems programming” doesn’t mean “no dynamic data allowed.”

And maybe both are right. Because if you’re writing hard real-time firmware, this isn’t for you.

But if you’re wrangling a dynamic runtime or GUI graph, a little controlled chaos might just make sense.

Rust doesn’t need a garbage collector to stay great, but letting people experiment with one might make it greater.

It’s less about abandoning ownership, and more about acknowledging that even the tidiest house can use a cleaning service once in a while.

Share

Last week we had you solve the Run-Length decode challenge. Kudos Byte𓂆Smith, and ukarim.

Expression Evaluator

Write a function eval(expr: &str) -> Result<i64, String> that parses and evaluates a mathematical expression string containing integers, +, -, *, /, and parentheses.

You should:

  • Respect operator precedence and parentheses

  • Handle negative numbers and extra whitespace

  • Return Err for invalid expressions instead of panicking

 Rust Bytes Challenge Issue #90 Expression Evaluator
Image: Rust Bytes Challenge Issue #90 Expression Evaluator

Test your solution on Rust Playground. Once completed, please share your solution and tag us either on X, BlueSky, Mastodon, LinkedIn, or reply to this email.

Share

Twiggy is a code size profiler designed to answer the big questions every developer eventually faces: “Why is this function even here?” and “How much space would I save if I killed it?”

The problem Twiggy solves is simple but painful - Wasm binaries can quietly pack on weight as your project grows, pulling in unnecessary dependencies and dead code.

Twiggy analyzes your binary’s call graph, showing exactly what’s included, who’s calling what, and how much space you’d save if you trimmed the fat.

Here’s what Twiggy offers:

  • Smart Call Graph Analysis – Understand the “why” behind every function that made it into your binary.

  • Retained Size Insights – See the true cost of each function, including the chain reaction of dead code it carries.

  • Simple Setup – Install it straight from Cargo and start profiling in minutes.

Made by the Rust-Wasm pros means it’s built by Rustaceans who actually get WebAssembly performance pain.

Twiggy is open-source at https://github.com/AlexEne/twiggy.

Share

  1. The Clippy team shared what they Learned from Clippy’s Feature Freeze. The initiative supercharged community engagement, with 326 PRs opened, 47 new contributors (delivering 195 of those PRs), and an all-time peak in weekly activity.

  2. Niko Matsakis proposed a redesign of Rusts destructor model that introduces new traits (Forget, Destruct, Move, Pointee) to guarantee cleanup, enable async/const drops, and prevent resource leaks.

  3. In other news, the Ubuntu Project announced that a bug in the Rust-based uutils version of the date command included with Ubuntu 25.10 has broken automatic updates.

  4. Jaromir Hamala of QuestDB recounts how a simple interview question on concurrency led him down a rabbit hole to explore Rust’s fetch_max atomic operation.

  5. Michael wrote Integration Testing Rust Binaries, a deep dive into building a custom Rust integration test harness with fixtures and async support using libtest-mimic and inventory.

  6. Alex Saveau’s “Generalizing over mutability in Rust”, demonstrates a trait-based trick to generically handle both mutable and immutable slices in Rust, elegantly abstracting over mutability.

  7. The Rustaceans at Apache shared how they made Arrow’s Parquet metadata 3–9× faster with a custom Thrift parser in Rust.

  8. How to Avoid Fighting Rust’s Borrow Checker might be the last guide you need to avoid Rust borrow fights with tree ownership, split borrows, IDs/arenas, deferred mutations, and data-oriented designs over OOP.

  9. Zed finally made it to Windows. Expect those weekly updates, just like our Mac and Linux friends have been bragging about. Took it long enough, right?

  10. Open Device Partnership has open-sourced Patina Firmware, a UEFI firmware implementation written entirely in Rust.

Bonus:

  1. Jon Gjengset hosted a Rustacean Station live-stream marathon diving into what’s new in Rust 1.81–1.84.

Share

CodeCrafters created amazing Rust courses that push your skills beyond the basics.

You’ll have fun building real-world projects from scratch, including Git, Docker, Redis, Kafka, SQLite, Grep, BitTorrent, HTTP Server, an Interpreter, and DNS.

The courses are self-paced, so you can learn at your own speed. If you’re itching to level up your Rust skills, these courses are perfect for you.

Join for free and get 40% off when you upgrade. [affiliate]

Share

You’re Rust Bytes’ biggest fans, and we love to see it.

Here’s how you can help:

Last week was great, finished some tasks, read several chapters and had fun too.

That's all for now, Rustaceans.

John & Elley.

Read Entire Article