mozilla / cbindgen

A project for generating C bindings from Rust code
Mozilla Public License 2.0
2.43k stars 315 forks source link

Make `ir` module public #1009

Open LucaCiucci opened 1 month ago

LucaCiucci commented 1 month ago

This would allow users to easily customize the bindings by inspecting the bindings items.

Is there any particular reason why most of the modules are private?
If the concern is exposing too much complexity, we could just make ir and other modules public with a feature flag, such as "internals".

AFAIK the only walk-around at the moment is to use a modified version of this crate.

zhp46 commented 1 month ago

I think this feature would be nice too, currently I am also using a modified version of this crate to do this. The IR is very useful when using the generated C objects in bindings for other languages.

heesooy commented 1 month ago

@emilio are you the right person to tag here? I put up a PR to expose the ir module under a feature flag. I also had a similar use case where I'm using the ir and currently having to fork. Let me know what you think.