cbaggers / autowrapped-cimgui Goto Github PK
View Code? Open in Web Editor NEWThe most minimal bindings over the cimgui
License: BSD 2-Clause "Simplified" License
The most minimal bindings over the cimgui
License: BSD 2-Clause "Simplified" License
Dear Baggers:
I‘m Clsper as a Common Lisp hobbyist。 I really love the videos you upload on YouTube,It helps me a lot。
But there comes with some questions that only can learn from you。
At the channel :
https://www.youtube.com/watch?v=BL9MiiCcETM&ab_channel=Baggers
Lots of bits of Lisp - Generating Bindings to C Libraries
You introduced the Foreign Library:Libfive。
Can you show me more about use It through CFFI?
For examples:
https://libfive.com/examples/
// All of these trees are manually managed and must be freed
// In higher-level languages, freeing can be attached to the object's
// destructor and run during garbage collection.
libfive_tree x = libfive_tree_x();
libfive_tree y = libfive_tree_y();
libfive_tree x2 = libfive_tree_unary(libfive_opcode_enum("square"), x);
libfive_tree y2 = libfive_tree_unary(libfive_opcode_enum("square"), y);
libfive_tree s = libfive_tree_binary(libfive_opcode_enum("add"), x2, y2);
libfive_tree one = libfive_tree_const(1);
libfive_tree out = libfive_tree_binary(libfive_opcode_enum("sub"), s, one);
// Select a 2D region to export, then write an SVG
libfive_region2 R;
R.X.lower = -2;
R.X.upper = 2;
R.Y.lower = -2;
R.Y.upper = 2;
libfive_tree_save_slice(out, libfive_region2 R, 0, 10, "circle.svg");
// Finally, clean up all of the intermediate trees
libfive_tree_free(x);
libfive_tree_free(y);
libfive_tree_free(x2);
libfive_tree_free(y2);
libfive_tree_free(s);
libfive_tree_free(one);
libfive_tree_free(out);
When I Generated Bindings to C Libraries of Libfive,invoke the function ‘libfive_tree_save_slice’ comes with errors。
As the resource of C code shows,libfive_tree_save_slice using nested struct variable as its arguments,and that not support by CFFI。It seems that,CFFI only support struct POINTER as its arguments on C side。For common use,we hope we can handle with any C code resource rather than modify the C codes as sometimes we can’t get resource but only “*.so” files。
Would you mind give me a hand,Thank you very much。
Yours Sincerely
Another lisper,
Clpser。
Hi,
I know this isn't really meant for anyone to use, but I've been interested in getting imgui up and running with CL and this was basically the only repo that offered a solution (bonus: precompiled local libraries for multiple platforms).
However, I found that several definitions (namely, struct definition for e.g. ImGuiIO) are missing altogether, which seems to block initialization outright (can't feed imgui the necessary input codes for it to actually work in this case, most likely other issues down the line).
I tried to reproduce the cl-autowrap binding generation on my end to see if I could get it to generate the struct definitions, but I was even more surprised when it failed to generate anything at all (only constants are present in the spec file generated).
I then tried claw
, and the results were even worse...
I ended up using swig
to generate initial bindings from the c++ codebase instead of cimgui (it also choked on cimgui anyway) and then edited them quite a lot to make them actually not explode.
Beside the need for hand editing, swig
is discontinuing common lisp support in v4.1+ so it's not a viable long-term solution.
The reason I am opening this issue is to know, when you have some time again, if you plan to polish up autowrapped-cimgui
, and failing that, if you could say how, specifically, you generated the bindings initially so I can see if I can reproduce/patch-up/fix them on my end?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.