4 ms·
For a recent project (http://keymux.com/ http://keymux.com/) I chose Yue (https://libyue.com/ https://libyue.com/), a cross-platform native widget GUI toolkit f
by wahern 3y ago
For a recent project (http://keymux.com/ http://keymux.com/) I chose Yue (https://libyue.com/ https://libyue.com/), a cross-platform native widget GUI toolkit for C++, JavaScript/Node.js, and Lua. I've only used the Lua interface and macOS backend, but it has worked quite well, despite the very steep learning curve. This was also my first desktop GUI app, so I had to learn many implicit concepts that weren't obvious from the otherwise extensive documentation.
Yue was the only option that 1) supported macOS, 2) supported Lua, 3) was sufficiently comprehensive to build a non-toy GUI app, 4) and that I could integrate into my (static) build. I couldn't even get the wxWidgets Lua interfaces to compile, and Qt and FLTK wrappers had similar stories, whereas reverse-engineering the baroque Yue build (based on Google's internal build systems) was relatively simple. The first candidate I tried was libui, but it had some crashing bugs that didn't inspire confidence, the widget set was bare, and most importantly development had ceased. Yue had some sharp edges, but I was able to work around them whilst patiently waiting for patches and fixes upstream.
Immediate mode interfaces were a non-starter for me. For a non-trivial set of otherwise typical controls and window management you have to implement too much yourself, plus being non-native they not only felt wrong (which admittedly is somewhat subjective; the younger crowd seems to think non-native, immediate mode interfaces look more state-of-the-art), but lacked other interfaces for proper desktop integration, like theme change signaling (i.e. notification that a user switch between light and dark modes in the macOS system settings panel).
All in all I would highly recommend Yue.
- vram22 3y ago>All in all I would highly recommend Yue >despite the very steep learning curve. ? I used your quotes out of context, I know, because those phrases are in different parts of your comment, and I did it because I could, ahem, reuse your words, and it looked cool to do so, but the question is genuine: Why do you recommend it despite the very steep learning curve? Because of support for Lua? macOS?
- wahern 3y agoI meant that the steep learning curve related to the intrinsic complexity of dealing with desktop GUI frameworks, which I lacked experience with previously: terminology, layout and flow caveats (e.g. with embedded scroll panels, limitations on autosizing and reflow in the absence of explicit dimensions), etc. The Yue author clearly has extensive GUI SDK experience, and while comprehensive, like many open source projects the Yue documentation assumes some minimal understanding of the concepts and inevitable limitations. The only possibly unnecessary complexity with Yue is the build framework, but that sort of thing can be quite subjective and a function of various requirements (personal, third-party libraries--it uses Facebook's Yoga for automagic layout and reflow) and familiarity. Excepting libui (which is basically defunct), all the frameworks I investigated had terribly complex builds, so it's pretty much par for the course. Notably, Yue releases prebuilt binaries with every release. I couldn't make use of those because I wanted a fully static, fat application binary (x86-64 + arm64), and also I needed a convenient, local Yue build for writing and testing patches.
- fuzztester 3y agoThanks for the answer.