惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
月光博客
月光博客
爱范儿
爱范儿
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
腾讯CDC
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
U
Unit 42
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
L
LangChain Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Stop Fighting Go GUIs: Build Sleek Desktop Apps in Pure G...
Czax225 · 2026-06-01 · via DEV Community

Czax225

The state of GUI development in Go has always been a bit complicated.

You either have to wrestle with heavy C-dependencies like GTK and Qt bindings that make cross-compiling a nightmare, or settle for web-view frameworks that turn a simple desktop utility into a 150MB RAM-hogging Electron clone.

If you love Go for its simplicity, speed, and single-binary deployment, your GUI library should look and feel the same way.

That is exactly why I built Proton.

What is Proton?

Proton is a lightweight, pure-Go GUI framework built on top of the incredibly fast Gio engine. It utilizes an immediate-mode architecture, meaning your UI renders dynamically every single frame.

The philosophy behind Proton is straightforward: Zero C-dependencies, ultra-fast performance, and a developer experience that does not make you want to pull your hair out.

Here is why it works so well:

Pure Go: No cgo required. Cross-compiling actually works out of the box.

Featherweight: Tiny binary sizes and low resource usage.

Immediate Mode: Your state lives directly in your code. No complex data-binding boilerplate.

Themeable: Comes with built-in palettes like Catppuccin, Nord, and Rose Pine.

See it in Action: The 5-Minute Setup

Here is a complete, self-contained application with an input box, a button, and basic text handling in just a few lines of 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 First Proton App")

    // Apply a theme instantly
    a.ApplyPalette(proton.CatppuccinPalette)

    a.Window("Hello Proton", 480, 300, func(win *proton.Win) {
        proton.H3(win, "Welcome to Go GUIs done right")
        proton.Gap(win, 12)

        // Interactive Input
        proton.Input(win, &u.name, "What is your name?")
        proton.Gap(win, 12)

        // Immediate-mode button handling
        if proton.Button(win, &u.btn, "Greet Me") {
            println("Hello, ", u.name.Text())
        }
    })

    a.Run()
}

Enter fullscreen mode Exit fullscreen mode

Layouts Without the Headache

If you have ever used Gio directly, you know that managing layouts and constraints can require a lot of nesting. Proton abstracts that complexity away into intuitive layout functions:

Stacking: Arrange components cleanly using Row(win, ...) and Column(win, ...).

Flexibility: Use GrowRow alongside GrowItem and FixedItem to create responsive sidebars and expanding content panes.

Proportions: Instantly split screens using Split(win, 0.25, leftSide, rightSide) for instant dashboard layouts.

Spacing: Fine-tune visuals cleanly with Pad(), PadH(), and Gap()

// Example of a quick responsive layout split
proton.Split(win, 0.25, func(left *proton.Win) {
    proton.Label(left, "Sidebar Navigation")
}, func(right *proton.Win) {
    proton.H1(right, "Main Content Dashboard")
})

Enter fullscreen mode Exit fullscreen mode

Real Features for Real Apps

Proton is not just a proof-of-concept for text and buttons. It includes the actual utilities you need to build functional software:

Virtualized Lists: List() and HList() only render what is visible on screen, letting you scroll through thousands of rows smoothly without breaking a sweat.

Keyboard Shortcuts: Global hotkeys are a first-class citizen. Fire events using proton.OnKey(win, key.ModCtrl, "S", saveFunc).

Async Notifications: Show modern, non-blocking toast notifications safely from any background goroutine using u.toast.Show("Saved!", 2 * time.Second).

Asset Embedding: Includes a simple built-in CLI tool (Proton logo path/to/img.png) that caches and bakes assets directly into your binary.

Try it out

Ready to ditch the heavy web frameworks and complex C bindings? Getting started takes seconds. Just initialize your Go module and pull the library:

mkdir myapp && cd myapp
go mod init myapp
go get github.com/CzaxStudio/proton

Enter fullscreen mode Exit fullscreen mode

If you are on Linux, just grab your standard graphics drivers (libwayland-dev, libxkbcommon-dev, libvulkan-dev). Windows and macOS users need zero extra system dependencies.

The project is completely open-source and moving fast. Check out the example applications, including a fully functional Calculator and a CyberTool showcase, directly in the repository.

Take a look at the Proton GitHub Repository, try out the examples, and let me know what you think in the comments. I am curious to see what you build with it.

If you like it then please star the Repo

GitHub logo CzaxStudio / proton

A framework for building GUI applications in Go, Stay positive :)

Proton

A GUI library for Go. Built on Gio. No C deps, pure Go.

Example apps (made using Proton)

Note: These are very basic, you can make even better apps.

GUI demo
Example app 2

Logo

Proton

Getting started

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())

Enter fullscreen mode Exit fullscreen mode