3 ms·
"The Servo team really wants GCed, safe pointer support in Rust, and design work is well underway. But it's going to take a while to stabilize." Any details on
by mcguire 10y ago
"The Servo team really wants GCed, safe pointer support in Rust, and design work is well underway. But it's going to take a while to stabilize."
Any details on this? GCs and finalizers don't really work well together, which is why I gave up on my cycle detector implementation.
- Veedrac 10y agoThey want objects that can be shared with Javascript.
- Manishearth 10y agohttp://manishearth.github.io/blog/2016/08/18/gc-support-in-rust-api-design/ http://manishearth.github.io/blog/2016/08/18/gc-support-in-r... The reason Servo in particular would like GC hooks is because JavaScript is GCd and we want to be able to pass around Spidermonkey-managed pointers safely. We have a framework in place that does this, but proper compiler support would be nice. Servo doesn't need to worry about finalizers because our DOM structs never have nontrivial destructors (explicit Drop impls). The blog post throws around some ideas for dealing with the finalized problem though.