Generate webrender_ffi_generated.h at build time
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: kats, Assigned: emilio)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(4 files)
Now that we're using m-c as the canonical home for WR, I'm not running cbindgen on each WR update anymore. This means that it's easier for people to forget to run cbindgen and accidentally introduce bugs.
We should generate webrender_ffi_generated.h at build time instead of having it checked into the tree to make this a little more robust.
Comment 1•6 years ago
|
||
(Note that cbindgen is already a build-time requirement for the style system, so this should be relatively straightforward).
Comment 2•6 years ago
|
||
Don't we have a requirement for using nightly rust when running cbindgen? Also cbindgen, webrender and the latest rust nightly don't mix. (https://github.com/servo/webrender/issues).
In the near term perhaps we can just make the build fail somehow if the webrender_ffi_generated.h is not correctly updated?
Comment 3•6 years ago
|
||
Emilio, how realistic short-term is it to use cbindgen for WR like we do for the style system?
Comment 4•6 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
In the near term perhaps we can just make the build fail somehow if the webrender_ffi_generated.h is not correctly updated?
(I'm not sure how we'd detect that the bindings needed to be updated without running bindgen and comparing the output).
Assignee | ||
Comment 5•6 years ago
|
||
So the annoying part is the WR uses cbindgen in quite a different way than the style system, doing all the macro expansion that requires nightly rust or such.
I don't have the context as to know why we need the macro expansion, but if that goes away running cbindgen at build-time would be much more straight-forward.
Assignee | ||
Comment 6•6 years ago
|
||
I talked with bobby, should be fixable to use #[derive] in euclid instead of a macro. Then we can do this.
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/620e00a8a3ac
https://hg.mozilla.org/mozilla-central/rev/8a7ab9b279fe
https://hg.mozilla.org/mozilla-central/rev/e3d38e17dec8
Description
•