-
Notifications
You must be signed in to change notification settings - Fork 24
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
Possibly add a version of the bindings with "internal" turned off #10
Comments
I try to avoid the burden of having both versions. |
Thanks for the quick reply!
Alright, then I'll come up with a solution on my end. I think I might take implot as a submodule and vendor in a no-internals version of cimplot created with your generator along with an attribution note and backlink to the repo here.
The build fails because "cimplot with internals" requires symbols from "cimgui with internals" - at least that was the conclusion I came to when trying to get things to work. I don't think it is possible to switch imgui-rs to use the imgui internals without forking the repo - there is an issue for adding support for this, but it does not look to be resolved soon. |
Do you have a compiler error with symbols missing? |
I'll try to come up with one - it has been a while since I've done those experiments, the reason I opened the issue today is that I thought I could get back into things and this might help. The fact that you say things are expected to work is already very good input for me, it makes me suspect that I am doing something wrong on my end. I'll go experiment a bit (might take a while, I'm not sure if I'll get to it today) and get back to you once I have some results. |
Another question for me to experiment with: The imgui-rs version I point to seems to vendor in an older version of cimgui from back in april, so I am not sure which version of cimplot I should pair this with to try and get things working. If I naively try out the current master, I get errors in the bindings generation process with bindgen about
... and, looking around imgui, I find that type in the I'm not sure what follow-up things to ask, because I don't want to waste your time with problems specific to the way I create and build my Rust bindings - I just describe things here in case there is something super obvious you can help me with without having to deal with all the details. |
You could try to compile implot examples with the imgui present in back in april It is strange because |
Thanks for the hints, I'll do more experiments.
So far I have been using cimplot so I can create an FFI to a C API - if that C API requires the inclusion of a C++ header, I have to deal with C++ code at the FFI boundary, and then I might as well attempt to create bindings to the C++ code directly. Maybe I am just confused though and am missing the point.
For cimplot.cpp things should be fine (that is a C++ build anyway), but cimplot.h itself refers to things like In any case, the original issue is answered and I'll see if I can work around the problem in implot-rs itself a bit, so we can close the issue I think. Thanks for all your help! |
But this is not docking_inter branch but master branch. (In dockin_inter ImRect is found in https://github.com/cimgui/cimgui/blob/docking_inter/cimgui.h#L1390) |
Update: without internal in cimgui and internal in cimplot compilation succeds but the problem appears in the part of cimplot.h revealed with |
Thanks for looking into this further! I did not yet get around to do more experiments, but I'll see if I can make one of your two suggestions work. |
Hi there, thanks for keeping these bindings up to date, I use them every day in several projects via my Rust bindings that build on them.
One snag I have run into is that the version of the bindings in this repo has the internal API exposed, which is nice in terms of enabling the most APIs for users, but unfortunately gets me into trouble (I think, maybe I'm just doing something wrong) with the imgui Rust bindings that use a cimgui version without the internal API exposed (see imgui-rs/imgui-rs#395 (comment)).
I considered forking cimplot and running the generator with the internal flag off or vendoring everything altogether in implot-rs, but of course it would be even nicer to have both a version with "internal" and one without it already in the repo here.
What do you think? Thanks in advance for any help or advice.
The text was updated successfully, but these errors were encountered: