News for hackers. Stuff that matters.
Re:Implementing a safe garbage collector in Rust by gwbas1c on Friday April 29, 2022 @04:47PM (#31210400)
One thing I'm trying to understand is: Is this a garbage collector for Rust; or is this a garbage collector implemented in Rust for another environment.

It's confusing because the author refers to their Emacs VM; but then refers to Rc in Rust.

Re:Implementing a safe garbage collector in Rust by nicoburns on Friday April 29, 2022 @06:52PM (#31211524)
It’s currently the latter, but the author believes that this approach could be cleaned up and generalised to also be the former. I believe it would then be a general purpose GC library in Rust that could be used for Rust code or any environment written in Rust.
Re:Implementing a safe garbage collector in Rust by steveklabnik on Friday April 29, 2022 @04:51PM (#31210442)
The latter, implemented in Rust (in my understanding).

They bring up Rc<T> because using reference counting as their implementation is in theory a possibility, which they then quickly (and rightfully, imho) dismiss.

Re:Implementing a safe garbage collector in Rust by zamalek on Friday April 29, 2022 @06:36PM (#31211398)
Although you probably could use it for something else, Boa[1] is a good demonstration of this (it uses the GC crate, but the same principle probably applies).

[1]: https://github.com/boa-dev/boa