LedoCorp / UI toolkit / 0.9.2
Gru
Build desktop UI in Go without dragging a whole browser stack along for the ride. Compose widgets, run a retained-mode frame loop, draw with Raylib. Optional WebView2 when you need an HTML panel on Windows.
What it is
Gru (GRU) is a retained-mode UI toolkit for desktop apps written in Go.
The public package is github.com/ledocorp/gru/ui: widgets, layout, text, theme,
window chrome, and an inspector. You import it like any other module, then either
copy cmd/hello or scaffold with the gru CLI.
Windows is the primary dogfood surface (S1: 1x present + sticky ClearType text). Linux ships the same S1 present/text story (1:1 window, outline sticky text). Android is a beta NativeActivity path on the toolkit tip. License is GPLv3. Governance is BDFL (no public PRs). Current release tag is 0.9.2 (0.9.0 introduced the S1 ship default). Quick refs: cheatsheet / Gru Notepad.
How it works
- Retained tree - widgets are
Nodes that persist across frames (not rebuilt every paint) - Frame phases - each frame is
Update->Layout(if dirty) →Draw/ blit - Document - owns the root, chrome insets (title bar), focus, and the main-thread work queue
- Signals - UI state is usually
Signal[T]; mutations mark the tree dirty - Composition - build pages with flex +
Panel/Card/ListTile(named shell recipes in the docs) - Rendering - Raylib with a cached 1x framebuffer by default (MSAA + LCD text + high-res glyphs); optional higher scale via env for testing; idle frames blit the last frame
- WebView2 - optional child HWND host for HTML; native widgets stay in the GL tree
What you use it for
- Desktop tools and utilities with native-feeling chrome and controls
- Apps that need a Go widget tree plus an occasional embedded web view
- Learning patterns from the curated demo catalog (
-tags grudemo)
Gru Notepad
Gru Notepad is a product-shaped showcase of the toolkit: edge shell, editor,
multi-doc sessions, markdown preview, syntax highlight, and spell check in one thin host.
It lives in a separate repository and depends on this module
(require github.com/ledocorp/gru).
Showcase page with clips / shawnlondono/gru-notepad
Try it
Grab a Go toolchain and open a window in a minute. WebView samples also need the WebView2 Runtime (Windows). Start from the getting started guide or v0.9.2.
go get github.com/ledocorp/gru@v0.9.2
# from a clone of github.com/ledocorp/GRU:
go run ./cmd/hello
go run -tags webview2 ./cmd/webviewhello
go run -tags grudemo . # scenes; Tab / F12
go run ./cmd/gru new myapp
GPLv3 / LedoCorp / version 0.9.2
What’s in the package
ui/· widgets, layout, text, inspector, themecmd/gru·new,build,packagecmd/hello· minimal native sample (copy this loop)cmd/webviewhello· FillClient WebView sample-tags grudemo· scene catalog for composition and controlsdocs/· guides + architecture chapters (also summarized on this site)