I don't think it would be too hard. At one point I had a WIP patch which
implemented it, but I would have to dig it up again.

I'll see if I can get a patch up for the crate in my spare time.

On Sun, Mar 26, 2017 at 11:26 PM, Ehsan Akhgari <ehsan.akhg...@gmail.com>
wrote:

> On 2017-03-17 10:08 AM, Michael Layzell wrote:
> > I don't think we have any particularity good tools for this right now. A
> > while ago I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1320179
> to
> > add a separate crate like the nsstring crate which provides the nsresult
> > bindings. If we are starting to get more use cases for it we probably
> want
> > to implement something like it which moves the error code definition code
> > into python or similar, and then generates both rust and C++ bindings in
> > the outdir.
>
> I think the right way to do it is to have an nsresult crate as you
> suggest.  How much work would that be?
>
> As far as code parsing goes, we already have nsError.h, so why can't we
> just use rustbindgen?  But I guess moving the definitions elsewhere and
> generating the headers out of them is easy as well.  The build system's
> support for generated files is pretty good as far as I know.  Whichever
> way is easier is better, I guess!
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to