I would like to use the AST library from a foreign language via C/FFI. I could simply do a library where I would create functions to map existing AST functions to new functions just for the purpose of creating an interface.
But I am wondering if there is way to automatically expose std.zig.Ast via FFI automatically?
I can’t imagine any way that is possible other than manually wrapping the functions in an exported function.
That may be possible to automate via a script or even using the actual std.zig.Ast itself, but it is unclear exactly how much work you would really be saving by the time your code generation is robust and working correctly.