gru

command module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

README

Gru

Version: 0.8.0

Gru (GRU) is a Go-first UI toolkit (retained-mode, Raylib-backed) for building desktop applications.

License: GNU GPLv3 · BDFL (no public PRs) · version 0.8.0
Third-party notices: NOTICE
Copyright: Shawn Londono and LedoCorp
Publisher: LedoCorp · Maintainer: Shawn Londono


What’s included

  • Full ui/ platform — widgets, layout, text, inspector
  • Curated demo app (-tags grudemo) — widget / composition demos, Tab to switch, F12 Inspector
  • Optional WebView2 demos (-tags webview2) on Windows
  • cmd/gru — scaffold, build, and package apps (gru new, gru build, gru package)
  • Sample appscmd/hello (native) and cmd/webviewhello (FillClient WebView shell)

Showcase app (separate repo)

Gru Notepad is a product-shaped example of this toolkit (editor, sessions, markdown preview, syntax, spell). It requires github.com/ledocorp/gru and is not vendored into this repository.

What’s not in this repository

  • Prism (paused / private)
  • Full Studio testing harness and private catalog
  • Foundry R&D (internal)

Commercial dual-licensing may come later; it is not part of this release.


Module

go get github.com/ledocorp/gru@v0.8.0
import "github.com/ledocorp/gru/ui"

Use @latest once you are comfortable tracking the newest tag.

Quick start (Windows)

From the repository root (folder with go.mod, assets/, pages/):

go run ./cmd/hello
go run -tags webview2 ./cmd/webviewhello
go run -tags grudemo .
go run -tags "grudemo,webview2" .

Scaffold a new app:

go run ./cmd/gru new myapp
go run ./cmd/gru new myapp --webview
Guide Path
Docs home docs/README.md
Cheatsheet docs/CHEATSHEET.md
Layout contracts docs/LAYOUT.md
Getting started docs/GETTING_STARTED.md
CLI docs/CLI.md
Composition docs/COMPOSITION.md
WebView docs/WEBVIEW.md
Architecture docs/architecture/README.md
Widgets docs/widgets/README.md
API docs/api/README.md
Demo index docs/DEMO_INDEX.md
Build & smoke docs/BUILD.md
Key Action
Tab Next demo scene
F12 Inspector
F11 Perf overlay (optional)

Pull requests are not accepted on this repository — see CONTRIBUTING.md.

Primary target today: Windows.


Open-source credits

Gru depends on these projects. Please respect their licenses. Full texts and notices: NOTICE.

Project Role License (summary) Link
Raylib (via raylib-go) Windowing & rendering Zlib https://www.raylib.com/
Remix Icon Icon font / atlas Remix Icon License v1.0 https://github.com/Remix-Design/RemixIcon
Inter, Poppins, Fira Code, DM Mono Bundled UI / mono fonts SIL OFL 1.1 See assets/fonts/*/OFL.txt
go-text/typesetting Text shaping BSD-3-Clause (+ MIT HarfBuzz subtree) https://github.com/go-text/typesetting
goldmark Markdown MIT https://github.com/yuin/goldmark
chroma Syntax highlighting MIT https://github.com/alecthomas/chroma
go-latex LaTeX helpers BSD-3-Clause https://codeberg.org/go-latex/latex
gospell Spell-check MIT https://github.com/client9/gospell
gg / sbinet/gg Imaging helpers MIT
fsnotify File watching BSD-3-Clause https://github.com/fsnotify/fsnotify
zenity Native dialogs MIT https://github.com/ncruces/zenity
modernc.org/sqlite (+ libc/memory/mathutil) SQLite BSD-3-Clause https://gitlab.com/cznic/sqlite
golang.org/x/image / x/net / x/sys / x/text Go extended libs BSD-3-Clause https://pkg.go.dev
golang/freetype Font raster (via x/image stack) BSD-style https://github.com/golang/freetype
go-webview2 (vendored) Windows WebView host MIT / ISC (loader) Vendored under internal/go-webview2
Microsoft Edge WebView2 Embedded web runtime (Windows) Microsoft redistribution terms https://developer.microsoft.com/microsoft-edge/webview2

Contributing

See CONTRIBUTING.md.

Security

Report security issues per SECURITY.md.


Gru (GRU) — Copyright Shawn Londono and LedoCorp — GPLv3 · BDFL · 0.8.0

Documentation

Overview

Demo debug helpers for the grudemo launcher (F5–F11 / env toggles).

Consolidated at repo root so public export stays a short allowlist — not a scatter of debug_*.go files. Keys:

F5  caret / idle blockers          F6  benchmark (main)
F7  resize FPS + idle guard        F8  resize propagation
F10 draw-dirty trace               F11 perf overlay (main)
Shift+F11 WebView flash

Env: GRU_DEBUG, GRU_IDLE_GUARD, GRU_WEBVIEW_DEBUG (GORY_* aliases).

Package main is the Gru demo launcher.

Press Tab (or the on-screen button) to cycle through the available demo scenes. Each scene is built by a function in the examples/ package.

Platform helpers for desktop vs Android (raylib NativeActivity).

This file is compiled on every GOOS; branches use isAndroidApp() so desktop keeps MSAA, custom chrome, and default window size. Android-only entry is main_android_init.go (build tag). See docs/ANDROID_CODE.md.

Directories

Path Synopsis
cmd
gru command
gru is the Gru packaging CLI — build, test helpers, and package desktop apps.
gru is the Gru packaging CLI — build, test helpers, and package desktop apps.
hello command
hello is the public Gru sample — GRU core spine then a tiny scene (docs/GRU_CORE.md).
hello is the public Gru sample — GRU core spine then a tiny scene (docs/GRU_CORE.md).
webviewhello command
webviewhello — Gru WebView shell starter (window + title bar + HTML body).
webviewhello — Gru WebView shell starter (window + title bar + HTML body).
devtools
studio
Package studio implements Gru Studio chrome — the internal demo launcher side panel.
Package studio implements Gru Studio chrome — the internal demo launcher side panel.
Package examples (continued)
Package examples (continued)
appinstance
Package appinstance forwards startup files to an already-running Gru Notepad.
Package appinstance forwards startup files to an already-running Gru Notepad.
startuppath
Package startuppath resolves optional file paths from argv and environment.
Package startuppath resolves optional file paths from argv and environment.
internal
appicon
Package appicon applies OS-facing GRU icons using raylib (SetWindowIcons) and embedded PNGs/ICOs.
Package appicon applies OS-facing GRU icons using raylib (SetWindowIcons) and embedded PNGs/ICOs.
tray
Package tray hosts a desktop notification-area icon (separate goroutine; safe with raylib/GLFW).
Package tray hosts a desktop notification-area icon (separate goroutine; safe with raylib/GLFW).
version
Package version holds release strings injected by cmd/gru at link time.
Package version holds release strings injected by cmd/gru at link time.
media
imaging
Package imaging provides decode and thumbnail helpers for T2a (pure Go).
Package imaging provides decode and thumbnail helpers for T2a (pure Go).
samples
hello
Package hello is the public “Hello, Gru” sample UI (not part of the demo catalog).
Package hello is the public “Hello, Gru” sample UI (not part of the demo catalog).
webviewhello
Package webviewhello is the WebView shell sample — native chrome + HTML body.
Package webviewhello is the WebView shell sample — native chrome + HTML body.
ui
Package ui (continued) See node.go for the full package documentation.
Package ui (continued) See node.go for the full package documentation.
markdown
Package markdown registers a goldmark (GFM) DocumentSpec bridge into package ui.
Package markdown registers a goldmark (GFM) DocumentSpec bridge into package ui.
preview
Package preview provides focused preview widgets: markdown rendering, syntax highlighting, and math placeholders.
Package preview provides focused preview widgets: markdown rendering, syntax highlighting, and math placeholders.
spell
Package spell registers a Hunspell/gospell SpellChecker backend into package ui.
Package spell registers a Hunspell/gospell SpellChecker backend into package ui.
syntax
Package syntax registers Chroma-backed syntax highlighting into package ui.
Package syntax registers Chroma-backed syntax highlighting into package ui.
Package x11util activates Gru Notepad windows on X11 (WSLg, Linux desktop).
Package x11util activates Gru Notepad windows on X11 (WSLg, Linux desktop).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL