Closed
Bug 1354944
(wr-binding)
Opened 8 years ago
Closed 8 years ago
Autogenerate (much of) the webrender_ffi.h file
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
The FFI boundary for webrender has gfx/webrender_bindings/src/bindings.rs on the rust side and gfx/webrender_bindings/webrender_ffi.h on the C++ side. However right now any changes in one have to be manually reflected in the other, which is error-prone.
We now have a binding generator at https://github.com/jrmuizel/wr-binding which is getting close to done. The binding generator can take as input the rust code, and can generate a large subset of the stuff in webrender_ffi.h. This bug is tracking the remaining work needed to put it into production use.
The goal here is to have the wr-bindings generator generate a bindings file which is then checked in at gfx/webrender_bindings/webrender_ffi_autogen.h and #include'd into gfx/webrender_bindings/webrender_ffi.h. If changes are made to bindings.rs or any of the rust code it depends on, the binding generator will need to be run manually. This will produce a new webrender_ffi_autogen.h file which can then be checked in along with the rest of the changes.
There are a few things missing before we can get this done, I'll file other bugs hanging off this one for those items.
Assignee | ||
Comment 1•8 years ago
|
||
There's also going to be some fixes in wr-bindings needed, so I'll add those as issues on the github repo. e.g. jrmuizel/wr-binding#2
See Also: → https://github.com/jrmuizel/wr-binding/issues/2
Assignee | ||
Updated•8 years ago
|
Alias: wr-binding
Assignee | ||
Updated•8 years ago
|
See Also: → https://github.com/jrmuizel/wr-binding/issues/4
Assignee | ||
Comment 2•8 years ago
|
||
With all the dependencies fixed I have this working. Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e09ddc847aae07fe343ba03ebc55afe7b00da77
Comment 3•8 years ago
|
||
Putting THIS FILE IS GENERATED! DO NOT MODIFY MANUALLY! See https://github.com/jrmuizel/wr-binding! on every function seems a little aggressive.
Assignee | ||
Comment 4•8 years ago
|
||
It is a little aggressive, yeah. But the function signatures are large enough that the warning only shows up every few lines. And in my experience a single warning at the top is usually not sufficient to stop people. But I can reduce it to one warning per "block" (i.e. one for structs, one for functions, etc). Also I should rename the file to be _generated.h instead of _autogen.h since it's technically not "auto"-generated.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bugmail
Assignee | ||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8857219 [details]
Bug 1354944 - Plug in the generated FFI header.
https://reviewboard.mozilla.org/r/129156/#review131678
Attachment #8857219 -
Flags: review?(jmuizelaar) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/199dd7c4179f
Plug in the generated FFI header. r=jrmuizel
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•8 years ago
|
||
bugherder |
Assignee | ||
Updated•8 years ago
|
status-firefox55:
--- → fixed
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•