logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·05.11.26
← Back to news

Show HN: Shirei, cross-platform GUI framework in native Go

Original article
github.com|23 points|9 comments|by hsn915|Jul 12, 2026

Shirei: A Native Go Approach to Cross-Platform GUIs

Welcome to the unveiling of Shirei, a fresh take on building graphical user interfaces (GUIs) using pure Go. The primary ambition here is to provide a seamless, cross-platform experience without the typical headaches associated with native bindings.

The Motivation: Escaping the "Cgo Tax"

For too long, Go developers have been forced to choose between limited native libraries or the complexity of Cgo. While Cgo allows us to tap into powerful C libraries, it introduces a significant "tax" on the development process:

"The moment you introduce Cgo, you lose the simplicity of the Go toolchain. Cross-compilation becomes a nightmare, build times skyrocket, and you're suddenly debugging memory leaks in a language you didn't intend to use for your business logic."

Shirei was born from the desire to suffer through linker errors eliminate these dependencies entirely. By implementing the framework in native Go, we regain the ability to go build for any target platform with minimal friction.

Technical Architecture

Shirei operates on a decoupled architecture that separates the application logic from the underlying windowing system.

Performance and Layout

The layout engine is designed for efficiency. Instead of recursive overhead, it utilizes a linear pass for constraint resolution. The computational complexity for a single layout update can be represented as:

Cost=∑i=1nO(ki)\text{Cost} = \sum_{i=1}^{n} O(k_i)Cost=∑i=1n​O(ki​)

Where nnn is the number of widgets and kkk is the constant time required to calculate the bounds of a specific element.

Feature Comparison

How does Shirei stack up against traditional approaches?

FeatureShireiC-Binding FrameworksWeb-Based Wrappers
Pure Go✅❌❌
Easy Cross-Compile✅❌⚠️
Binary SizeSmallMediumLarge
Memory OverheadLowLowHigh
Native Look & Feel✅✅⚠️

Getting Started

Implementing a basic window in Shirei is designed to be intuitive. Here is a minimal example:

package main

import "github.com/shirei-gui/shirei"

func main() {
    // Initialize the application context
    app := shirei.NewApp()

    // Create a primary window
    win := app.NewWindow("Hello Shirei", 800, 600)

    // Add a simple label widget
    win.AddChild(shirei.NewLabel("Welcome to native Go GUIs!"))

    // Start the event loop
    app.Run()
}

Shirei Interface Example

Current Status & Roadmap

Shirei is currently in an early alpha state. It is production-ready an experimental project, but the core foundations are solid.

Development Checklist

  • Basic window creation and event polling
  • Native Go implementation of basic widgets
  • Cross-platform support for Windows and Linux
  • macOS Cocoa integration (Beta)
  • Hardware-accelerated rendering via Vulkan/Metal
  • Comprehensive theme engine

If you are tired of fighting with gcc just to put a button on a screen, give Shirei a try. We are looking for contributors to help expand the widget library and optimize the rendering pipeline!