Show HN: Shirei, cross-platform GUI framework in native Go
Shirei introduces a new cross-platform GUI framework for Go, championing an 'immediate mode' API for building native, self-contained applications. It promises a truly cross-platform experience with flexbox-like layouts, emphasizing that this paradigm is the "only sane way" to develop UIs. This bold claim and its Go-native approach make it a compelling topic for Hacker News's technically-minded audience.
The Lowdown
Shirei is a cross-platform GUI framework written entirely in Go, aiming to simplify the creation of native desktop applications. Eschewing web technologies, it allows developers to build UIs directly in Go code, producing lightweight, self-contained executables.
- Cross-Platform & Native: Shirei supports macOS, Windows, and Linux from a single codebase, generating native executables typically around 10MB. It's particularly noted for creating dependency-free Linux GUIs.
- Immediate Mode API: The framework's core philosophy centers on an immediate mode API, drawing parallels to React's declarative style where the UI is described every frame based on data, eliminating the need for manual widget state management.
- Comprehensive Features: Beyond basic UI, it offers full support for international text (complex shaping, bidirectional layout, IME), flexible styling akin to flexbox, and is designed to be easy for both human developers and AI agents to use.
- Practical & Opinionated: The author asserts that an immediate mode API is the "only sane way" to program GUI applications, a strong stance that informs the framework's design principles.
Shirei positions itself as a practical, full-fledged framework for Go developers seeking to build efficient, native GUI applications with a modern, declarative approach to UI construction.
The Gossip
Immediate Mode Melee
The discussion immediately ignited around the author's strong assertion that immediate mode is the 'only sane way' to program GUI applications. While the author vigorously defended its scalability, one commenter expressed skepticism, suggesting that many developers eventually pivot away from this belief for truly complex UIs.
AI's Authored Ancestry
A curious user noted the presence of AI co-authors (Claude, Codex, etc.) on significant commits in the repository's history, raising questions about the readability and utility of such a commit log for human developers. The author clarified that the GitHub repository is a 'publish-only mirror,' implying that the visible commit history doesn't reflect the actual, granular development workflow.
Rendering & Rival Frameworks
Commenters sought technical details regarding Shirei's rendering capabilities, specifically inquiring if it leverages GPU acceleration. There was also a comparison drawn to Ebitengine, another Go-based engine, and questions about Shirei's suitability for resource-constrained environments like Raspberry Pi.