Closed Bug 1536582 Opened 5 years ago Closed 5 years ago

Generate Servo_ binding functions using cbindgen.

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 files)

No description provided.

Err, bug description should read:

This should massively simplify the amount of boilerplate needed to tweak and add new ffi functions, which is always a pain. It should also improve buildtimes by virtue of avoiding running bindgen twice, but we could do that in other ways I guess.

Priority: -- → P3
Depends on: 1536584
Depends on: 1538661
Depends on: 1538694

This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.

There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.

But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).

I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4600398650aa
Autogenerate Servo_ binding functions with cbindgen. r=boris
Assignee: nobody → emilio
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: