Last updated: 2026-03-16
NEW: gogpu/ui v0.1.0 released! — 22 widgets, 3 design systems (Material 3, Fluent, Cupertino), reactive signals. Read the announcement →
Join the UI Discussion: We're building an enterprise-grade GUI toolkit for Go. Your input matters! GitHub Discussions
Happy New Year, Gophers!
As 2025 drew to a close, I shared something that made me incredibly proud: Go is entering 2026 with its first professional graphics ecosystem.
Back then, it was 249,000 lines. Today — three months later — it's 580,000+ lines of Pure Go code, a complete GPU computing stack, and a GUI toolkit with its first release. All requiring nothing but go build.
No CGO. No Rust. No C. Just Go.
Where We Are Now (March 2026)
The Numbers
| Metric | Jan 2026 | Feb 2026 | Mar 2026 |
|---|---|---|---|
| Total Lines of Code | 249K | 380K | 580K+ |
| GPU Backends | 5 | 5 | 5 (Vulkan, DX12, Metal, GLES, Software) |
| Shader Targets | 4 | 4 | 4 (SPIR-V, MSL, GLSL, HLSL) |
| Platforms | 3 | 3 | 3 (Windows, Linux X11/Wayland, macOS) |
| Test Functions | — | 1,400+ | ~6,000+ (UI alone: ~3,900) |
| UI Widgets | — | 6 | 22 interactive + 3 design systems |
| Repositories | 5 | 9 | 9 (+1 infra) |
| CGO Required | None | None | None |
The Ecosystem
| Project | Description | Version |
|---|---|---|
| gogpu/gg | 2D Graphics (~194K LOC) | v0.37.1 |
| gogpu/ui | GUI Toolkit (~146K LOC) | v0.1.1 |
| gogpu/wgpu | Pure Go WebGPU (~124K LOC) | v0.21.1 |
| gogpu/naga | Shader Compiler (~65K LOC) | v0.14.7 |
| gogpu/gogpu | GPU Framework (~42K LOC) | v0.24.2 |
| gogpu/gpucontext | Shared Interfaces | v0.10.0 |
| gogpu/gputypes | WebGPU Types | v0.3.0 |
| gogpu/gg-pdf | PDF Export | v0.1.0 |
| gogpu/gg-svg | SVG Export | v0.1.0 |
What Changed Since January
A lot happened in six weeks. Here are the highlights.
GPU SDF Accelerator
The biggest architectural addition: hardware-accelerated shape rendering via Signed Distance Fields.
import _ "github.com/gogpu/gg/gpu" // opt-in GPU acceleration
dc := gg.NewContext(800, 600)
dc.DrawCircle(400, 300, 100)
dc.Fill() // GPU renders via SDF if available, CPU fallback otherwise
The accelerator auto-detects circles, ellipses, rectangles, and rounded rectangles from path data. Shapes that match get rendered via SDF compute shaders. Everything else falls back to the CPU rasterizer — transparently.
Architecture: CPU Core + GPU Accelerator
We made a fundamental architectural decision based on analysis of 8 enterprise 2D engines (Skia, Cairo, Vello, Blend2D, tiny-skia, piet, Qt RHI, Pathfinder):
CPU rasterization is the core. GPU is an optional accelerator.
In none of the 8 libraries analyzed is CPU rasterization a "backend". It's always the core. We follow the same pattern:
gg (2D Graphics)
├── internal/raster/ — CPU rasterization core (always available)
├── internal/gpu/ — GPU acceleration (uses wgpu HAL)
└── gpu/ — Public opt-in: import _ "github.com/gogpu/gg/gpu"
-
gg.Fill()tries GPU first, falls back to CPU - ~17ns overhead when no GPU registered
- No "backend" abstraction in gg — GPU enhances, doesn't replace
Compute Shader Pipeline
Full GPU compute pipeline is now operational:
- naga compiles WGSL compute shaders to SPIR-V
-
wgpu provides
ReadBufferHAL for GPU→CPU data transfer -
gogpu exposes
HalProviderfor sharing GPU devices across the ecosystem - gg dispatches SDF compute work to the GPU
Shader Compiler Maturity (naga)
The shader compiler grew significantly:
- v0.8.3 → v0.14.7 (6 major releases)
- Hex literal suffixes (
0xFFu,0x00i) - SPIR-V validation fixes for compute shaders
-
OpFunctionCallsupport - Runtime array support for storage buffers
- 60+ WGSL built-in functions
WebGPU Evolution (wgpu)
- v0.9.2 → v0.21.1 (12 major releases)
- New public Core API: Instance, Adapter, Device, Queue, Surface, CommandEncoder — with validation, state tracking, resource lifecycle
-
ReadBufferHAL abstraction — GPU buffer readback - GPU Resource Leak Detection (zero overhead when disabled)
- W3C WebGPU Error Scopes (LIFO stack)
- Thread Safety Tests (concurrent access validation)
- Vulkan
InitialLayoutfix forLoadOpLoadrender passes
Premultiplied Alpha Pipeline
Industry-standard premultiplied alpha compositing throughout the entire stack. Eliminates dark halos around anti-aliased shapes — matching what Skia, Cairo, and every professional engine does.
Application Framework (gogpu)
The GPU framework matured significantly:
- v0.9.2 → v0.24.2 (15 major releases)
-
WindowProvider/PlatformProviderinterfaces - DPI awareness, clipboard, cursor management (Win32)
-
SetCharCallbackfor Unicode text input (W3C PointerEvents) -
PrepareFrameplatform lifecycle - Eliminated ~950 lines of code duplication via HAL abstraction
GUI Toolkit: v0.1.0 Released!
In January, gogpu/ui was "2026 Focus" with zero widgets. In February, 54K LOC and 6 widgets. Now — v0.1.1 released with 146K LOC, 22 interactive widgets, 3 design systems, and ~3,900 tests.
22 Interactive Widgets
Inputs: Button, Checkbox, Radio, TextField (Unicode/Cyrillic), Dropdown, Slider
Data: ListView (virtualized), GridView, DataTable (sortable columns), TreeView, LineChart, ProgressBar, Progress (circular)
Containers: ScrollView, TabView, SplitView (resizable), Collapsible (animated), Docking (IDE-style), Popover/Tooltip
Navigation: Toolbar, MenuBar + ContextMenu
3 Design Systems
- Material 3 — 21 painters, HCT color science, seed color generation
- Fluent Design — 9 painters, Microsoft accent color system
- Cupertino — 9 painters, iOS toggle switch, segmented control
Infrastructure
- Reactive signals (coregx/signals) — Signal, Computed, Effect, two-way bindings
- Animation engine — Tween, Spring, M3 presets, Stagger/Chain/Repeat orchestration
- i18n — CLDR plural rules, RTL detection, reactive LocaleSignal
- Icon system — 10 built-in Material icons, vector path rendering
- Drag & Drop — DragSource/DropTarget interfaces
- Font Registry — CSS font-weight matching (W3C spec)
- HoverTracker — W3C PointerEvents, hit-testing, cursor management
- FocusManager — Tab/Shift+Tab navigation
- ScreenBounds — Flutter-style localToGlobal coordinate transforms
- Testing utilities — MockCanvas, MockContext, event factories
What's Next for UI
- Performance optimization (dirty region tracking implemented, need integration)
- Accessibility platform adapters (UIA, AT-SPI2)
- More examples and documentation
- Community feedback on modular architecture (monolith vs uikit extraction)
What's Working Right Now
Full Cross-Platform Support:
- Windows — Win32 windowing, Vulkan + DX12 + GLES backends, DPI awareness
- Linux X11 — Pure Go X11 protocol, Vulkan + GLES backends
- Linux Wayland — Pure Go Wayland protocol, Vulkan + GLES backends
- macOS — Cocoa windowing, Metal backend
Complete Shader Pipeline:
- WGSL source code
- Compiles to SPIR-V (Vulkan), MSL (Metal), GLSL (OpenGL), HLSL (DirectX)
- Vertex, fragment, and compute shaders
- 60+ built-in functions, atomics, barriers
GPU-Accelerated 2D Graphics:
- SDF accelerator for circles, rectangles, rounded rectangles
- Vello-inspired tile rasterizer (Sparse Strips)
- 29 blend modes (Porter-Duff + Advanced + HSL)
- Premultiplied alpha pipeline
- Layers, alpha masks, GPU text rendering
- PDF export backend (gg-pdf)
What's Coming: GPU Path Rendering
We just completed a deep research study of GPU path rendering across 8 libraries. The result: a three-tier GPU rendering architecture for gg.
The Problem
Our current GPU accelerator handles detected shapes (circles, rects) via SDF. Everything else falls back to CPU. For complex paths — bezier curves, concave polygons, paths with holes — we need GPU rendering too.
The Solution: Stencil-Then-Cover
The same algorithm used by Skia, Gio, femtovg, and NV_path_rendering:
Pass 1 (Stencil Fill):
Fan triangles from path → GPU writes winding numbers to stencil buffer
Two-sided stencil: front=IncrWrap, back=DecrWrap
Pass 2 (Cover):
Bounding quad over path → read stencil → write color where stencil ≠ 0
Key insight: No complex CPU triangulation needed. Triangle fan from first vertex is O(n) and works for ANY path — concave, self-intersecting, with holes. The stencil buffer handles correctness.
Three-Tier Architecture
| Tier | Technique | Paths | Status |
|---|---|---|---|
| 1 | SDF Fragment Shader | Circles, rects, rrects | Working (CPU), render pipeline planned |
| 2a | Direct Convex Fan | Convex polygons | Planned |
| 2b | Stencil-Then-Cover | All general paths | Planned (9 tasks, ~10 days) |
| 3 | Vello Compute | All paths (optimal) | Future (blocked by shader compiler) |
This is the next major milestone for gg.
The Community Effect
Here's what I love most about open source: we're not alone.
Active community engagement:
- @amortaza — Real-world testing with Rust and Pure Go backends, reporting critical findings (Discussion #47)
- @ppoage — macOS ARM64 testing (M1/M4), critical Issue #24 investigation, code contributions
- @Nickrocky — macOS Metal backend testing and feedback
- Community-reported issues leading to Vulkan fixes, NVIDIA compatibility improvements
Inspiration:
- u/m-unknown-2025 — The Reddit post that inspired GoGPU
- born-ml/born — ML framework where go-webgpu bindings originated
And if something still doesn't work? We fix it. Together.
2026 Roadmap — Updated
| Quarter | Focus | Status |
|---|---|---|
| Q1 | GPU SDF Accelerator, Architecture, Ecosystem Releases | Done |
| Q1 | GPU Path Rendering (ClipRoundRect, RRect SDF) | Done |
| Q1 | UI Toolkit: 22 widgets, 3 themes, v0.1.0 release | Done |
| Q1 | Ecosystem cascade release (wgpu Core API migration) | Done |
| Q2 | UI: Performance optimization, accessibility adapters | In Progress |
| Q2 | UI: Architecture decision — modular vs monolith | Planned |
| Q2-Q3 | GPU Stencil-Then-Cover path rendering | Planned |
| Q3 | UI: v1.0 API stabilization | Planned |
| Q4 | Documentation, benchmarks, community growth | Planned |
A Message to the Go Community
For years, the answer to "How do I do graphics in Go?" was:
"Just use Rust/C++."
That answer is no longer acceptable. Go deserves better.
With Go 1.26 and 580K+ lines of Pure Go — from shader compiler to GUI toolkit — Go now has a GPU ecosystem that stands on its own. And with gogpu/ui v0.1.1, you can build real desktop applications today.
How You Can Help
Test on Your Hardware
git clone https://github.com/gogpu/gogpu
cd gogpu
go build ./examples/triangle/
./triangle
Report issues: github.com/gogpu/gogpu/issues
Join the UI Discussion
We're making architectural decisions right now. Before v1.0.0 freezes the API.
Contribute
What we need:
- Cross-platform testing (especially macOS, Linux Wayland, NVIDIA GPUs)
- Documentation and tutorials
- UI widget development (signals, widgets, layouts)
- Real-world usage examples
- Compute shader examples
Star the Repos
- gogpu/gogpu — Framework
- gogpu/gg — 2D Graphics
- gogpu/wgpu — Pure Go WebGPU
- gogpu/naga — Shader Compiler
- gogpu/ui — GUI Toolkit
Looking Forward
2025 was about proving it's possible.
2026 is about making it excellent — and we're well on our way.
Together, we're building the GPU ecosystem Go has always deserved. Not because we have to — but because we can.
Let's make 2026 the year Go graphics goes mainstream.
The GoGPU Series
All articles documenting the GoGPU journey:
- GoGPU: A Pure Go Graphics Library for GPU Programming — The beginning
- GoGPU: From Idea to 100K Lines in Two Weeks — The rapid development story
- Building a Shader Compiler in Pure Go: naga — WGSL to SPIR-V/MSL/GLSL/HLSL
- Pure Go 2D Graphics Library with GPU Acceleration: Introducing gogpu/gg — 2D graphics API
- GPU Compute Shaders in Pure Go: gogpu/gg v0.15.3 — Sparse Strips GPU compute
- Enterprise 2D Graphics Library — gg architecture
- Cross-Package GPU Integration — gpucontext
- Unified 2D/3D Graphics Integration — gg + gogpu
- gogpu/ui v0.1.0 — First Release (coming soon) — 22 widgets, 3 design systems
Related Pure Go Projects
Building GoGPU led to creating supporting libraries — all Pure Go, all zero-CGO:
- Pure-Go Race Detector — Race detection without CGO, used in GoGPU CI
- Go's Regexp is Slow. So I Built My Own — 3000x Faster — High-performance regex for text processing
Links
- Organization: github.com/gogpu
- Discussion: Join the conversation
-
Latest Releases:
- ui v0.1.1 — GUI toolkit (22 widgets, 3 themes)
- gg v0.37.1 — 2D graphics
- wgpu v0.21.1 — WebGPU
- gogpu v0.24.2 — Framework
- naga v0.14.7 — Shader compiler
Questions? Drop them in the comments or join the discussion.
See you at GopherCon 2026!

Top comments (6)
"The Go community and Go Team are here. We'll fix it. Together."
Why are you lying? What community? github.com/orgs/gogpu/discussions/...
You said: "We" = 1 human architect + AI tools. Same as most modern dev teams in 2025, just more honest about it.
You are not being honest here. Still waiting for that article about how you wrote 249,000 lines of Pure Go code in such a short amount of time.
Hi! ANDRES36, everything in its time... I didn't promise to publish it immediately.
I said I'd publish it when I have the time to finish it. I hope that time will finally appear after the New Year.
And may I ask why this intrigued you so much, why you're so eager to learn more?
shouldn't take that long, just use AI as usual. I just want people to know that your repo is completely AI generated, nothing wrong with that, you are allow to do it, if it works (I doubt), great, just be honest.
Well, I won't try to change your mind if you've already made up your mind... If all this is generated at the click of a button, you can immediately run your own project in parallel and see how LLMs can generate a project of this scale for you that actually works as intended... Then we'll compare the results.
I'm not claiming this is a 100% production-ready system right away, but I have no doubt that the community and the Go team will soon perfect it... Which is essentially the main point of this article, if you actually read it carefully!
You are delusional if you think people are going to come and fix that maintainability nightmare. are you unemployed? Are you trying to fool an employer? That would make sense.
Okay, please provide a link to your repositories. Show us your portfolio.