-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-generation of bindings #15
Comments
The definitions doesn't seem to contains all the imgui.h functions, for example it doesn't have |
I'll also add that there's always the option pre-generate a starting point and then maintain by hand |
Honestly I'm leaning towards using the headers, the |
|
Code generation would be of great help of course. However, the documentation will be lacking, since it is so unstructured and ad hoc in the headers. |
If I understood correctly, in dear-imgui's latest release (5 hours ago) they announced a new "exciting project": Dear Bindings: alternative binding generator for C and other languages. I thought it might be relevant to this thread 🙂 |
They've been around for a while, yes. Perhaps they are more mature now and it is worth taking a look again. (Also #146) |
I think I can hack a package for both of the JSON formats and then we'll see how process it into Haskell code. When the bulk is automated away, maybe it would be even worth it to have multiple packages in different styles. |
I've made the parser and now trying to get a handle on its C-based bindings and how to generate them. |
I started looking at imgui.h. It's large. I don't think it's reasonable to achieve feature completeness, even less maintainability, without auto-generating at least some portion of the bindings. We could rely on cimgui, or generate directly from the headers. This would also allow easier access to different branches of
ImGui
, such as the docking branch which supports multi-viewport.I haven't looked too much into it, but for cimgui here are some possible steps:
CInt
for each enum type, with the corresponding pattern synonymsThe text was updated successfully, but these errors were encountered: