HeadlinesBriefing favicon HeadlinesBriefing.com

Shirei: Go‑Based Cross‑Platform GUI Framework

Hacker News •
×

Shirei is a cross‑platform GUI framework written in Go that lets developers build native desktop applications without HTML or JavaScript. The same source compiles to Mac OS, Windows, and Linux, producing binaries of roughly 10 MB. The framework ships with a full runtime, so Linux users obtain self‑contained executables without extra dependencies.

Shirei adopts an immediate‑mode API, a pattern that forces the UI to be described every frame from the current data state. This eliminates the need to track widget lifecycles, mirroring the declarative style popularized by React. The approach simplifies state management and reduces boilerplate for developers.

The library offers a flexible flexbox‑style layout, full international text support—including complex shaping, bidirectional layout, and IME for East Asian languages—and access to system fonts. Its API is intentionally lightweight, allowing rapid prototyping and integration with AI agents that can generate UI code on the fly.

A minimal example creates a window titled “My App” with a counter button. The code shows the declarative `Container` and `Label` widgets, and the `Button` callback directly mutates a local `count` variable. The sample demonstrates how few lines of Go code can produce a functional desktop UI.