Yes, this could be done. I would like to have more automated checks here
however if we were to do this.

At one point I had considered letting the generated bindings be super
unsafe and then for each servo_*/gecko_* function have a safe wrapper that
is generated (or handwritten?) that forwards to it with the types replaced.

Generating it would still require the bindings build step to write code for
the style crate however. I wasn't sure if we could trust manually writing
it.

On Dec 14, 2016 10:45 PM, "Simon Sapin" <simon.sa...@exyr.org> wrote:

> On 15/12/16 02:01, Manish Goregaokar wrote:
>
>> They used to be a different crate. I merged them so that we can do
>> replacements with safer wrappers and have fewer coherence issues.
>>
>
> Could the code generated by bindgen be separated from the wrappers? That
> way wrappers could be wherever impl coherence require them to be, while
> keeping the bindgen-using build script in a dedicated crate.
>
> --
> Simon Sapin
> _______________________________________________
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
>
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to