-
Notifications
You must be signed in to change notification settings - Fork 16
Generate bindings from JSON #59
Comments
Just to mention, an alternative might be to modify c2nim postprocessor.nim to either output JSON or directly apply transformations to PNodes. This might be better considering raylib_parser is having trouble processing other files than raylib.h |
@planetis-m what is our current state of JSON vs c2nim implementation, what are your thoughts? JSON still has some problems as c2nim at least with pointers/arrays. So it's not that obvious what's going to be better at the end if we assume that c2nim will evolve. According to Nim survey tooling looks like a decent priority. Did you have a chance to look at c2nim API for ways to better integrate the conversion script? We can certainly reuse ideas from JSON script I think, looks like they intersect quite a bit. |
Araq made the branch |
I see! Okay, than I will do my part at restructuring the pipeline and I will take a closer look at how to integrate all the great stuff in the JSON PR and whether we would like to completely switch to it. I have very mixed feelings about choosing between c2nim and JSON version :) It is probable that for research purposes we might want to maintain both versions until there's a clear leader. |
In that case, a better alternative to raylib-parser is opir from futhark. We ca use its output instead. |
Raylib provides a parser which conveniently generates specification of all the types and functions for its sources. This should be a better option than current struggle with multi-step processing of C and Nim files.
Current PoC: https://gist.github.com/planetis-m/04d4fb2a3784329d2c6d2e20ed52c2fc
The text was updated successfully, but these errors were encountered: