Hey everyone! I’ve been a Go dev for many years now, and I’m sure you’ve noticed that Go has its fair share of headaches when it comes to GUI app development.
I looked at the options out there: Fyne is cool, but CGO? Why? Then there’s Gio… but the learning curve is pretty brutal. Wails is great, but then you’re forced to write HTML, JS, and CSS.
So, I decided to build a pure Go GUI framework right on top of Gio called Proton.
Example code
package main
import "github.com/CzaxStudio/proton"
type UI struct {
name proton.Editor
btn proton.Clickable
}
func main() {
u := &UI{}
a := proton.New("my app")
a.Window("Hello", 480, 300, func(win *proton.Win) {
proton.H3(win, "Hello from Proton!")
proton.Gap(win, 8)
proton.Input(win, &u.name, "Your name")
proton.Gap(win, 8)
if proton.Button(win, &u.btn, "Go") {
println("Hello,", u.name.Text())
}
})
a.Run()
}
It requires zero CGO, it’s dead simple to use, and it’s completely open-source. If this sounds like something you’ve been looking for, please give it a spin! If you try it and don’t like it, I’d love to hear your feedback on what I can fix or improve. Let me know what you think!
really wanted to create something that gives Go developers a clean, immediate-mode layout engine without the headache of Cgo dependencies or heavy web-tech runtimes.
Since you are interested in Go GUI options, I’d love to know: What kind of desktop tools or apps are you usually building (or wanting to build) in Go? If there are specific components or layout widgets you find yourself constantly needing, let me know—I’m actively shaping the roadmap for the next point-releases!"
I’m looking at Proton now. The idea and API look pretty good, similar to Compose in Android. However, it seems there is no way to use existing GIO widgets in Proton (maybe through some wrapper). For example I would like to use GIO’s Decorations and RichText because they are not present in Proton. This is just the result of 2 days of evaluation. Serious use very likely discovers more needs like that.