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.
On Fri, Mar 17, 2017 at 6:03 AM, Henri Sivonen <hsivo...@hsivonen.fi> wrote: > It seems that our Rust bindings for nsresult are part of Stylo, but > Stylo isn't yet a guaranteed part of the build. > > Until Stylo becomes a mandatory part of the build, what's the proper > way to return nsresult from Rust such that it works with or without > Stylo enabled? > > -- > Henri Sivonen > hsivo...@hsivonen.fi > https://hsivonen.fi/ > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform