Proton: A pure-Go immediate-mode GUI framework without CGO

I wanted to share a project I’ve been working on called Proton, a framework/library designed for building desktop GUI applications in Go without relying on CGO.

Why Proton?

Many existing GUI solutions for Go either require heavy CGO dependencies (which complicates cross-compilation) or force a context switch into web technologies. Proton aims to provide an immediate-mode UI development experience directly in pure Go. Your draw function runs every frame, and widgets stack vertically by default, keeping state management straightforward.

Key Features

  • Zero CGO: No extra dependencies needed for Windows or macOS. Linux requires only standard system development packages (libwayland-dev, libxkbcommon-dev, libvulkan-dev).

  • Immediate Mode: Layouts and widgets are declared sequentially in code.

  • Built-in Layouts & Widgets: Includes standard text controls, buttons, inputs, list views, splitters, grids, and dialog overlays.

  • Theming: Comes with built-in palettes like Dark, Nord, Rose Pine, and Catppuccin, alongside custom palette support.

Getting Started

You can install the package using:

go get GitHub - CzaxStudio/proton: A framework(library) for building GUI applications in Go without any need of CGO. · GitHub

Here is a minimal hello world application:

package main

import “github.com/CzaxStudio/proton”

func main() {
a := proton.New(“hello”)

a.Window("Hello", 400, 200, func(win proton.Context) { // Before we had win but now it is changed to Context
    proton.H3(win, "Hello from Proton!")
})

a.Run()

}

The repository includes a few standard examples to check out, such as a calculator, a todo app, and a comprehensive kitchen-sink widget showcase:

go run ./examples/calculator
go run ./examples/kitchen

The project is currently under active development heading toward v0.2.5. If you have any feedback, feature suggestions, or issues, please feel free to open an issue or contribute on GitHub.

1 Like

Perfect , Deserves many stars :star: