Re: Notes about implementing DOM APIs in Rust

2016-06-23 Thread Ms2ger
On 22/06/16 19:05, Henri Sivonen wrote: > We shouldn't expect to be able to use Servo's implementations of DOM > APIs in a drop-in a manner in Gecko. Because Servo allocates Rust > objects on the JavaScript heap, but Gecko doesn't allocate C++ objects > on the JavaScript heap, For the record, this

Re: Notes about implementing DOM APIs in Rust

2016-06-22 Thread Henri Sivonen
On Jun 23, 2016 1:33 AM, "Andrew McCreight" wrote: > > On Wed, Jun 22, 2016 at 1:05 PM, Henri Sivonen wrote: > > > Now that I'm looking at the hand-written notes that I made in the > > meeting, I notice that the above paragraph fails to say how the > > AddRef, Release and associated cycle collect

Re: Notes about implementing DOM APIs in Rust

2016-06-22 Thread Andrew McCreight
On Wed, Jun 22, 2016 at 1:05 PM, Henri Sivonen wrote: > Now that I'm looking at the hand-written notes that I made in the > meeting, I notice that the above paragraph fails to say how the > AddRef, Release and associated cycle collection-related calls are > routed from C++ to Rust or from Rust to

Re: Notes about implementing DOM APIs in Rust

2016-06-22 Thread Bobby Holley
Sure - it's just a question of whether this level of hackery is desirable for integrating with the rest of Gecko (a platform we control). I suspect that we can probably solve whatever use-cases arise in cleaner ways, but we should wait for use-cases to appear first. On Wed, Jun 22, 2016 at 10:33 A

Re: Notes about implementing DOM APIs in Rust

2016-06-22 Thread Jack Moffitt
> I do not recall dismissing exposing COM-compatible vtables from Rust. We must implement COM interfaces in Rust for Windows platform things* already. Specifically I have macros that generate IUnknown which for Windows COM includes AddRef, Release, and QueryInterface. For COM interfaces with singl

Re: Notes about implementing DOM APIs in Rust

2016-06-22 Thread Josh Matthews
On 2016-06-22 1:05 PM, Henri Sivonen wrote: Additionally, there was some discussion about reference counting. Implementing an XPCOM binding for Rust was not a popular idea and was discarded. Still, it was considered important to be able to use Gecko-style reference counting in a cycle collector-

Notes about implementing DOM APIs in Rust

2016-06-22 Thread Henri Sivonen
Last week, people interested in the matter met to talk about implementing DOM APIs in Rust. Here are my notes. The summary of the meeting is that we shouldn't be designing bridge framework type of stuff ahead of time and for the time being we should instead address issues as they arise. We should