Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPort the Paris DOM bindings generator to Rust #240
Comments
|
FWIW, I've been investigating this. The current codegen is very Gecko/xpconnect-specific, including outputting opaque blobs of C++ at points. Boris agrees with me that the most productive avenue is to start the codegen from scratch for Rust and look at what kind of code can end up being shared between the two backends. |
|
Right. A lot of the work involved in the Gecko codegen is getting the C++ types just right, making sure things are allocated/deallocated/refcounted/whatever correctly, forward-declaration, #includes, namespaces, etc. All of that would look somewhat different for Rust. Furthermore, some things (like the implementation of overload resolution) rely on C++ method overloading; not sure what that looks like in Rust. We can obviously reuse the WebIDL parser and data model and the existing JIT integration setup, and should. |
|
I am actively working on this right now. |
|
No real point keeping this open. |
Add a test for the absence of a named getter on select elements.
Change debug printlns to logs. Addresses servo#10012. r? @glennw
Gecko uses a very advanced system for generating DOM bindings from WebIDL, developed through years of experience. It is apparently very good, so we should adopt it for servo as well.
Start by just exploring what's necessary to start emitting Rust code, then figure out how it is going to impact the definition of our DOM.
https://jstenback.wordpress.com/2012/04/11/new-dom-bindings/