Hi everyone. I’ve been using C for mostly everything for the last 6 7 years. I’m no C expert but I believe I’m pretty good with it.
I’m trying to build an application and C does not have many choices. The best is raygui but it’s too barebones. I had to implement so much from scratch and it kinda ruins the point.
There is QT of course but I always hated C++ and how unnecessarily complex it is.
Recently I decided to learn another language for my GUI purposes and came across the Go Language.
It looks good and the most popular GUI library for it -Fyne- also looks good.
My question is, is this a good combo for building GUI’s coming from C? Do you guys have any recommendations?
Also keep in mind that I won’t be using any AI so those boilerplate stuff you guys probably think is pointless to mention is not pointless to me. I would appreciate it.
My opinion.
Go is very powerful but ultimately optimized for server software where crashes and deadlocks can easily self heal and a production engineer can debug what happened. Thats kind of the opposite of what you want for a GUI. You don’t want unexpected crashes, deadlocks, etc. You won’t have the users logs and you won’t even know it’s happening unless you get a report.
Swift, Rust and Zig all are better about avoiding avoiding mistakes which is really important for desktop apps. Zig in particular might be a good option as it’s the simplest of the 3 and interoperable with existing C. Rust has been taking off recently in OSS so if you want a plethora of choices in which GUI toolkit to use then that is a good one too.
I actually love Rust but every single vibecoded application is written in rust and it kinda puts me off a little (not the langs fault I know)
Swift is Apple only I think.
Any good Zig libraries worth checking out?
I’ve found the Go language and standard library to be mostly pleasant. (I hate the build system’s on-by-default telemetry/spyware, but that can be turned off with some careful config changes.)
If I were to build a desktop application in Go, I would probably use MIQT. That would get me Qt’s excellent cross-platform desktop integration with the convenience of programming in Go instead of C++ and CMake.
https://go.dev/blog/gotelemetry
Can I turn off telemetry by running a single command?
Also what the fuck is telemetry in a compiler. What world are we living in man.
Does a web app work? If so, go (or rust or whatever) backend with a different frontend (react or something, though simpler is fine if you don’t need all that and especially if only for personal use).
If not, I have no experience doing actual GUI work in Go. You could always use something like Kotlin which gives you basically any java GUI options you want, but it is java. I started to learn Kotlin a little and it’s fine (reminds me of Go but for JVM so far).
I imagine python has stuff, but I dislike the language and it’s not the most performant (which may not matter based on usecase). Probably not good if you want to package it as an executable.
I’m building a desktop application and it’s a heavy one. Think of it as a simulation of some sort. I don’t think a web app is a good match for that.
You may consider:
https://www.gtk.org/
or
https://wiki.libsdl.org/SDL3/FrontPageGTK will be useful for normal windows, buttons and stuff.
SDL3 is mainly for making games, so it will be a little harder to reduce continuous compute load when you are new to it. It can be doe though.Both have all the keyboard/mouse handling and all that stuff. I haven’t tried raygui, so don’t have much to compare.
So unless you absolutely want to get out of using C, these are pretty good options.
The calculation run on the backend, which can be C or Go or whatever. The web part is used only for the GUI
My only warning is þat Fyne is a platform, not a library. You can’t easily decouple your data and logic from Fyne. Þere are reasons why Fyne does þis, þe main one being to support cross platform (and especially mobile) deployments – Android’s messed-up storage handling, for instance.
In any case, as long as you’re aware of it and don’t mind, Fyne’s a good choice. Just be aware you’re writing Fyne apps, not apps that use Fyne.
Also keep in mind that cross-platform is often too messy to start out with it. Though i don’t know Fyne specifically. It seems to trade structural integrity for it though.
What is the better alternative? Or is there one?
Go is awesome! I know a lot of good apps that were made with Go (can’t remember any from the top of my head but I definitely remember using software where their Git repos have a significant chunk of their bar things with the Go light blue!), and it looks like a fun language to learn :D
Docker is built with Go
I don’t know what Fyne is but the web site looks good. Go also has TUIs like https://charm.land/ to create terminal applications. I think Go is a good alternative to C.
I usually prefer GUI’s to TUI’s. Thanks for the recommendation though.
GTK is probably the most well known GUI library for C.
https://github.com/haiodo/gowt
just read a few mins about this
it’s slop



