3 ms·
Do you know any good GUI library in go (as you mention native GUIs as a weakness. Besides that what were you're problems with the C interop? In addition to the
by KarlKode 6y ago
Do you know any good GUI library in go (as you mention native GUIs as a weakness.
Besides that what were you're problems with the C interop? In addition to the lack of up to date documentation for more complicated examples, I had huge problems using the C interop layer with more complicated C++ libraries (mostly because the C interop has its problems with C++).
- sly010 6y agoC++ doesn't have a stable ABI, so C++ interop is usually done by wrapping a C++ library with a C interface first. This is true for most compiled languages afaik. GUI libraries often rely on specific language features so they are hard to wrap in other languages. That's why good GUI libraries don't exist in ANY language other than the ones they were written in.
- _ph_ 6y agoI think GUI libraries which offer C bindings are easy to wrap in other languages, that is why I like Gtk a lot. In my eyes, it works especially nice with Go. Tk should be easy to wrap for Go to, but usually one would prefer Gtk, when there is a choice :).
- _ph_ 6y agoI have been quite happy with the Gtk bindings for Go (https://github.com/gotk3/gotk3 https://github.com/gotk3/gotk3). As Gtk has a C Api, it is a good match for Go, actually Go makes Gtk nicer than calling it from C in my eyes, as the GObject wrap to Go types and you can just call methods on them vs. the C syntax of passing the GObject as the first function argument and having the object type in the function name. If you install the Gtk libraries on the Mac, Go programs written with gotk3 just compile and run there too.
- xyzzy_plugh 6y agoGio is coming along nicely. Once they go full tile-based-rasterization ala Pathfinder it'll be a contender. https://gioui.org https://gioui.org
- kureikain 6y agoI have great success with https://fyne.io/ https://fyne.io/ used it to build my home grown MFA app (written in Go, work on iOS, Android, Desktop). granted it takes a bit of binding in C to work on iOS.