MyGo
v0.10.0 · macOS, Linux, Windows

Desktop apps in Go.Tiny, fast, fully typed.

One small binary for macOS, Windows and Linux. Native UI or a web frontend in Go, with installers and auto-updates included.

Get started
Binary
~7MB
Memory, native UI
~44MB
Memory, webview included
~62MB
CPU at idle
0%

Sponsors

  • OpenUptime: open-source uptime monitoring and status pages

Become a sponsor

main.go
type counter struct{ n int }

func (s *counter) view(c *ui.Context) {
ui.Column(c).Fill().Center().Gap(12).Children(func() {
ui.Text(c, fmt.Sprint(s.n)).FontSize(40).Bold()
if ui.PrimaryButton(c, "Increment").Clicked() {
s.n++
}
})
}

func main() {
s := &counter{}
mygo.App.WhenReady(func() {
mygo.NewWindow(mygo.WindowOptions{
Title: "Counter",
Content: ui.View(s.view),
})
})
if err := mygo.App.Run(); err != nil {
log.Fatal(err)
}
}

No webview

The view is a Go function of your app's state. MyGo calls it to build each frame and draws it on the GPU, with Metal, Direct3D or OpenGL: no HTML, no JavaScript, no bindings.

Its windows open at once, and an app of native UI alone needs only Go to build and no webview to run.

Start a project
$ go run github.com/egoist/mygo/cmd/mygo@latest \
    init -template native my-app
$ cd my-app && go tool mygo dev