[dev-servo] Rooting APIs and idiomatic Rust

2015-09-23 Thread Josh Matthews
I have a branch of rust-mozjs where I attempted to implement a Rust version of CustomAutoRooter/AutoGCRooter from SpiderMonkey: https://github.com/jdm/rust-mozjs/commit/ff89d9609e17e7727c038c8ea8deab88bae4333e This compiles fine, but I hit problems when I attempted to integrate it with my

Re: [dev-servo] Rooting APIs and idiomatic Rust

2015-09-23 Thread Till Schneidereit
CC-ing some SpiderMonkey GC people. Terrence, I know that you did some Rust stuff recently, so maybe you have the required bits of information to comment on this? On Wed, Sep 23, 2015 at 7:15 PM, Josh Matthews wrote: > I have a branch of rust-mozjs where I attempted to

Re: [dev-servo] Rooting APIs and idiomatic Rust

2015-09-23 Thread Terrence Cole
On Wed, Sep 23, 2015 at 11:01 AM, Till Schneidereit < t...@tillschneidereit.net> wrote: > CC-ing some SpiderMonkey GC people. > > Terrence, I know that you did some Rust stuff recently, so maybe you have > the required bits of information to comment on this? > > On Wed, Sep 23, 2015 at 7:15 PM,

Re: [dev-servo] Rooting APIs and idiomatic Rust

2015-09-23 Thread Josh Matthews
On 2015-09-23 5:49 PM, Terrence Cole wrote: In Mozilla's C++ dialect, these two are roughly equivalent because fallible init goes though a manual |bool init(...args...)| function after rooting (and the tracer needs to deal with partial init). In the rust world that I envision, you'd be able to