Open
Description
Hi, I'd like to use bindgen to parse headers into ir without the codegen part, and then with ir I can generate bindings in other languages.
There is --emit-ir
, but that's in debug format which is not easily readable by machines.
I think we can make the ir
module public (may need some cleanup though), and/or add a --emit-ir-json
option to emit ir in json represetantion, something like:
{
"kind": "function",
"name": "foo",
"mangledName": "_foo",
"signature": {
"returnType": ...,
"params": [ ... ]
},
}
I'd be happy to work on a PR, if such change doesn't fall out of bindgen's scope.