Is anybody proud of their "Crafting Interpreters" garbage collector?

73 points rodyamirov

I know quite a few people have gone through the Crafting Interpreters book, starting at the beginning, and redoing everything in rust. The first two-thirds or so of the book are extremely amenable to that, and it's a joy, but when I got to the garbage collector, really, it wasn't coming together.

When I googled around, I found a lot of projects that lost interest before getting to the hard stuff (fair), I found some with serious performance issues because they did everything with a bunch of Arcs and so on, and I think I found one where they had basically followed the C code very closely, a lot of unsafe, and not very idiomatic rust code.

But I'm curious if anybody found a nice, idiomatic, clean way to get through the whole book? (or at least the garbage collector / allocation / deallocation part). I'm not saying it needs to be 100% safe code, I'm just curious if anybody has an implementation (or knows of an implementation) that they find very elegant and idiomatic and generally just "good.\