Show HN: Shirei, cross-platform GUI framework in native Go
Summary
Shirei is a cross-platform GUI framework for Go with an immediate mode API, supporting native executables for MacOS, Windows, and Linux without requiring external dependencies.
View Cached Full Text
Cached at: 07/12/26, 07:50 PM
hasenj/go-shirei
Source: https://github.com/hasenj/go-shirei
Shirei
Shirei is a Cross-Platform GUI framework for Go. You get to write the UI using Go, not HTML and Javascript.
Truely cross-platform: the same code base produces identical looking programs for MacOS, Windows, and Linux. Also happens to be the easiest way to produce a self-contained GUI program for Linux that does not require any dependencies.
※ “Shirei” is derived from the Japanese pronunciation of “Simple Layout”: シンプル・レイアウト → シレイ

Motivation
Experience has shown us that an immediate mode API is the only sane way to program GUI applications. Unfrotunately, there is not good library or framework that just works. Some of them require you to implement your own backend, some of them do not have a decent cross-platform story, some of them do not have proper support for non-latin text.
What is it that matters for “immediate mode”? Is it that the UI renders everything every frame? No. It’s that you build the UI by describing what it should look like everyframe, based only (or mostly) on the data.
This is why React won: no need to maintain UI widgets yourself, no need to keep track of their states in order to update them. You just say “at this point in time, I want a button here, and I want the label on it to say so and so, and when it’s clicked, I want to do this and that”.
Did this button exist before? What happens to it when you no longer need it?
You never have to answer these questions. This is the best part about React, and this is what “immediate mode” is all about.
It is no good if you have an API that just lets you “draw” things but you are also responsible for maintaining the state of all the “things” that you “draw”.

Features:
-
Native: real executable programs, not web pages. Typical binary size ≈10MB.
-
Immediate mode API in the true sense: you never need to maintain UI widgets or sync your data with widget state.
-
Works out of the box: not just a layout engine, but a full fledged framework that you can start using right away without any boilerplate.
-
Full support for international text: complex shaping, bidirectional layout, access to system fonts, IME support (input method editor) for East Asian langauges.
-
Flexible layout and styling: one of the good things about the web is that you have alot of flexibilty in how you arrange the UI; you’re not limited to just a standard set of widgets and containers. You can make your own.
-
Easy to learn API, for both humans and AI agents. If you have ideas for small programs you want to make but don’t have the time for, try asking the latest AI engines to use shirei to build it. You’ll be surprised how well they can use it.
Several example programs under examples/ — start with haystack
if you only look at one.
Getting started
Copy this into main.go in a new folder:
package main
import (
"fmt"
app "go.hasen.dev/shirei/app"
. "go.hasen.dev/shirei"
. "go.hasen.dev/shirei/widgets"
)
func main() {
app.SetupWindow("My App", 300, 100)
app.Run(RootView)
}
var count int
func RootView() {
Container(Attrs(Viewport, Background(220, 10, 97, 1)), func() {
Container(Attrs(Row, CrossMid, Pad(20), Gap(10)), func() {
Label(fmt.Sprintf("Counter: %d", count))
if Button(SymIPlus, "Increment") {
count++
}
})
})
}
Then type:
$ go mod init main
$ go mod tidy
$ go run .
Learn
Similar Articles
@yff666: Recently built Keel, a pure Go desktop UI framework. Based on Gio, no HTML/CSS/JS/WebView required. Supports macOS, Win…
A developer announced Keel, a pure Go desktop UI framework built on Gio that requires no HTML/CSS/JS/WebView, supporting macOS, Windows, and Linux with a component library, packaging tools, and MCP-based agent testing capabilities.
Gsxui – Shadcn-style components for Go
Gsxui is a shadcn-style component set for Go, enabling copy-in, type-checked, server-rendered UI components styled with Tailwind. It provides a CLI to initialize and add components.
@LinearUncle: After building the open-source harness Waku in Rust, I don't know what suffering the chatwise dev endured with Rust, because they've now quickly open-sourced a desktop GUI framework written entirely in Go — MyGo. https://github.com/egoist/my…
egoist has open-sourced MyGo, a desktop application framework written entirely in Go. It supports both system WebView-based web interfaces and native UI drawn with pure Go on the GPU, requires no cgo, ships as a single binary only a few MB in size, and comes with built-in typed IPC plus a complete packaging, signing, and release pipeline.
Show HN: I built a native app for coding agents with Rust and GPUI
Waku is a native application built with Rust and GPUI that unifies the management of coding agent CLIs, offering local-first storage, keyboard-driven control, and checkpointing features for seamless developer workflows.
Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
Adi2 is a modern GUI library for Ada that provides CSS styling, XML-based UI layouts, and rich content rendering on SDL3, with WebAssembly support and tooling features.