GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • gogpu
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles

This view

  • Original page
  • New address

GeezerVison is showing github.com — GoGPU

README.md

GoGPU Logo

GoGPU

Pure Go GPU Computing Ecosystem
1.6M+ lines of code. GPU power, Go simplicity. Zero CGO.

Go Version License Pure Go Discussions Open Collective


Why GoGPU?

GoGPU is to Go what Flutter is to Dart, Qt is to C++, and JavaFX is to Java — a professional, complete GPU computing ecosystem, not just a single library. From shader compilation and GPU abstraction to 2D/3D rendering, GUI toolkit with themed widgets, and platform integration — all in Pure Go with zero CGO.

Inspired by this discussion on r/golang. Go waited 17 years for a professional graphics ecosystem. We're building it — together with you.


Ecosystem

Library Purpose Version Stars Issues PRs
Foundation
🧱 gputypes WebGPU types shared across the ecosystem (the webgpu.h types and members)
🧱 naga WGSL + GLSL (preview) → SPIR-V/MSL/GLSL/HLSL/DXIL shader compiler (~532K LOC)
GPU Core
⚙️ wgpu Unified Go WebGPU — Pure Go + Rust FFI + Browser (Vulkan/Metal/DX12/GLES/Software, ~394K LOC)
⚙️ gpucontext Shared interfaces (DeviceProvider, EventSource)
⚙️ galloc O(1) offset allocator for GPU memory sub-allocation (~2.7K LOC)
Framework
🖥️ gogpu Graphics framework, windowing, compositor (ADR-067, ~117K LOC)
Graphics
🎨 gg 2D graphics, 5-engine smart rasterizer, GPU acceleration (~317K LOC)
🎨 g3d Pure Go 3D rendering (scene graph, PBR materials, forward renderer, ~16K LOC)
🎨 gg-pdf PDF export backend for gg recording
🎨 gg-svg SVG export backend for gg recording
Application
📱 ui Enterprise GUI toolkit (27 widgets, 4 design systems, Layer Tree compositor, ~247K LOC)
📱 editor Text/Code editor widget — GPU-accelerated, embeddable (like Monaco)
Platform Services
🔧 systray Pure Go system tray (Win32/macOS/Linux, zero CGO, ~9.4K LOC)
🔧 audio Pure Go audio engine (WASAPI/CoreAudio/PulseAudio, zero CGO)
🔧 compose Multi-process composition (Unix socket IPC, LZ4, ~10.5K LOC)
🎮 gamepad Pure Go gamepad/joystick input — XInput, evdev, IOKit, W3C

Pure Go | Zero CGO | Cross-platform


Architecture

┌─────────────────────────────────────────────────────────────┐
│              Your Application                               │
├─────────────────────────────────────────────────────────────┤
│   gogpu/ui (GUI)   │   born-ml/born   │   Your Framework    │
├─────────────────────────────────────────────────────────────┤
│  gogpu/gg (2D Graphics)  │  gogpu/g3d (3D Rendering)        │
│   Smart Rasterizer: Scanline│4×4 Tiles│16×16│SDF│Compute    │
│                 ↓ export to ↓                               │
│           gg-pdf (PDF)    gg-svg (SVG)                      │
├─────────────────────────────────────────────────────────────┤
│              gogpu/gogpu (Graphics Framework)               │
│    Windowing, compositor (ADR-067), damage overlay, input   │
│  gogpu/systray   gogpu/audio   gogpu/gamepad (🚧)           │
├─────────────────────────────────────────────────────────────┤
│    gogpu/gpucontext (Shared Interfaces)                     │
│ DeviceProvider, SurfaceCompositor, DamageSource, EventSource│
├─────────────────────────────────────────────────────────────┤
│    gogpu/gputypes (WebGPU Types, webgpu.h members)          │
│       TextureFormat, BufferUsage, PresentMode, etc.         │
├─────────────────────────────────────────────────────────────┤
│       gogpu/wgpu (Unified WebGPU: Pure Go │ Rust FFI │ WASM)│
├─────────────────────────────────────────────────────────────┤
│                   gogpu/naga (Shader Compiler)              │
│       (WGSL → SPIR-V/MSL/GLSL/HLSL/DXIL)                    │
├─────────────────────────────────────────────────────────────┤
│        Vulkan │ Metal │ DX12 │ OpenGL │ Software            │
└─────────────────────────────────────────────────────────────┘

Key Features

Feature Description
Zero CGO No C compiler required, simple go build
WebGPU API Modern, portable GPU abstraction
Smart Rasterizer 5 algorithms with per-path auto-selection (scanline, 4×4 tiles, 16×16 tiles, SDF, compute)
GLSL input (preview) naga reads Vulkan GLSL 440/450/460 and the GL 3.30 core / ES 3.00 dialects into the same IR it compiles WGSL to; the frontend is a preview — the remaining limits are named in the naga release notes
Triple Backend Pure Go (default), Rust FFI (-tags rust), Browser WASM — same API, build tag selects
Layered Design Use only what you need
webgpu.h Coverage The same types and members as webgpu.h; the Rust FFI backend converts them at the C boundary

Quick Start

package main

import (
    "github.com/gogpu/gogpu"
    "github.com/gogpu/gogpu/gmath"
)

func main() {
    app := gogpu.NewApp(gogpu.DefaultConfig().
        WithTitle("Hello GoGPU").
        WithSize(800, 600))

    app.OnDraw(func(dc *gogpu.Context) {
        dc.DrawTriangleColor(gmath.DarkGray)
    })

    app.Run()
}

Result: A window with a rendered triangle in ~20 lines of code.


gg + gogpu Integration

Use 2D graphics from gg directly in gogpu windows — with smart rasterizer auto-selection and GPU-direct rendering (zero CPU readback):

package main

import (
    "log"

    "github.com/gogpu/gg"
    _ "github.com/gogpu/gg/gpu" // Register GPU accelerator
    "github.com/gogpu/gg/integration/ggcanvas"
    "github.com/gogpu/gogpu"
)

func main() {
    app := gogpu.NewApp(gogpu.DefaultConfig().
        WithTitle("gg + gogpu").
        WithSize(800, 600))

    var canvas *ggcanvas.Canvas

    app.OnDraw(func(dc *gogpu.Context) {
        w, h := dc.Width(), dc.Height()
        if canvas == nil {
            var err error
            canvas, err = ggcanvas.New(app.GPUContextProvider(), w, h)
            if err != nil {
                log.Fatal(err)
            }
        }

        canvas.Draw(func(cc *gg.Context) {
            cc.SetRGB(1, 0, 0)
            cc.DrawCircle(400, 300, 100)
            cc.Fill()
        })

        canvas.Render(dc.RenderTarget()) // GPU-direct, zero-copy
    })

    app.Run()
}

Related Projects

Project Organization Purpose Version Stars Issues PRs
webgpu go-webgpu Zero-CGO WebGPU bindings (wgpu-native FFI)
goffi go-webgpu Pure Go FFI library (88-114ns overhead)
born born-ml Pure Go ML framework (97%+ MNIST)

Tutorials & Articles

We haven't had time to write comprehensive tutorials yet — we've been focused on building the ecosystem itself. But the community has started filling that gap:

Community Tutorials

🇨🇿 Pavel Tišnovský (root.cz — Czech Republic's leading tech portal) wrote two in-depth tutorials covering the gg 2D graphics library with 54 working examples:

  1. Creating 2D/3D Graphics and Animations in Go with GoGPU — 49 min read. Paths, Bézier curves, transforms, text, animations.
  2. GoGPU Part 2: Gradients, SVG & PDF Export — 39 min read. Gradients, vector export, GUI integration.
  3. Interactive Applications with GUI using GoGPU — ~40 min read. Windowing, ggcanvas, keyboard/mouse input, interactive Bezier editor.

Articles are in Czech — use Google Translate for other languages. The code examples are universal.

Our Articles

More on the GoGPU organization page on Dev.to.

  • A Shader Loop That Never Ran: What GPU Readback Found in gogpu/naga, a Go WGSL Compiler — Dev.to
  • gogpu/ui v0.1.54: Flutter's Gesture System in Pure Go — Arena, Recognizers, and All — Dev.to
  • Google Says Go Is Ideal for AI-Assisted Engineering. We've Been Proving It for a Year. — Dev.to
  • Extracting a GPU Compositor in Pure Go — Patterns from Flutter and Chromium — Dev.to
  • We Built a Pure Go 3D Renderer — Then Embedded It Inside a GUI Widget — Dev.to
  • gogpu/compose: Multi-Process GUI Composition in Pure Go — Dev.to
  • GoGPU: From Idea to 100K Lines — Dev.to
  • GoGPU Announcement — Dev.to
  • First Pure Go DXIL Generator — Dev.to

Status

Layer Component Status Description
Foundation gputypes ✅ v0.9.2 WebGPU types shared across the ecosystem (the webgpu.h types and members)
Foundation naga ✅ v0.22.7 WGSL and GLSL (preview) → SPIR-V, MSL, GLSL, HLSL + DXIL shader compiler, ~532K LOC
GPU Core wgpu ✅ v0.35.5 Triple-backend: Pure Go (Vulkan/Metal/DX12/GLES/Software), Rust FFI, Browser WASM; three public packages (root, thin hal, wgputest); adapter enumeration and hardware identity (UUID/PCI/LUID), ~394K LOC
GPU Core galloc ✅ v0.2.1 O(1) offset allocator (TLSF-inspired, 256 bins, zero heap allocs)
GPU Core gpucontext ✅ v0.32.0 Shared interfaces — DeviceProvider, SurfaceCompositor, DamageSource
Framework gogpu ✅ v0.55.0 Graphics framework, windowing, compositor, native printing, ~117K LOC
Graphics gg ✅ v0.52.7 2D graphics, 5-engine rasterizer, GPU acceleration, recording, ggcanvas, ~317K LOC
Graphics g3d ✅ v0.1.12 Pure Go 3D rendering — scene graph, PBR materials, forward renderer, ~16K LOC
Graphics gg-pdf ✅ v0.2.1 PDF export backend for gg
Graphics gg-svg ✅ v0.2.1 SVG export backend for gg
Application ui ✅ v0.1.55 Enterprise GUI toolkit — 27 widgets, 4 design systems, Layer Tree compositor, ~247K LOC
Application editor 🚧 Early dev Text/Code editor widget — GPU-accelerated, embeddable (like Monaco)
Platform systray ✅ v0.3.0 System tray — Win32/macOS/Linux, dark mode, notifications, ~9.4K LOC
Platform audio ✅ v0.1.0 Pure Go audio engine — WASAPI driver, WAV decoder, Mixer
Platform compose ✅ v0.2.0 Multi-process composition — Unix socket transport, LZ4, pull-based flow, ~10.5K LOC
Platform gamepad 🚧 Early dev Pure Go gamepad/joystick input — XInput, evdev, IOKit, W3C Gamepad API

Platforms

Platform Vulkan DX12 Metal GLES Software Rust FFI Browser
Windows ✅ ✅ — ✅ ✅ ✅ —
macOS — — ✅ — ✅ ⚠️ —
Linux (X11) ✅ — — ✅ ✅ ✅ —
Linux (Wayland) ✅ — — ✅ ✅ ✅ —
Browser/WASM — — — — — — ✅

See individual project ROADMAP.md files for detailed roadmaps.


Support

GoGPU is free and open source. If you find it useful, please consider supporting continued development:

🥇 First Sponsor: Inkflow (@omer316) — the person who asked "is there a way to support this project?" and then became the answer!

Backers

Sponsors


Star History

GoGPU Ecosystem Star History

Contributing

We welcome contributions! See individual repository CONTRIBUTING.md files.

Areas where we need help:

  • GUI widgets and themes for gogpu/ui
  • Cross-platform testing (macOS, Linux)
  • WebGPU examples and tutorials
  • Documentation

License

All projects are licensed under the MIT License.


GO ❤ GPU

Building the GPU computing ecosystem Go deserves
gogpu.dev · [email protected] · GitHub

Pinned Loading

  1. gogpu gogpu Public

    Pure Go GPU Application Framework — windowing, input, lifecycle, platform abstraction. Part of the GoGPU ecosystem.

    Go 451 38

Repositories

Loading
Type
Language
Sort
Showing 10 of 19 repositories
  • gg Public

    Enterprise-grade 2D graphics library for Go. Pure Go, zero CGO. Part of GoGPU ecosystem.

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/gg's past year of commit activity
    Go 173 MIT 24 9 9 Updated Nov 27, 2026
  • gogpu Public

    Pure Go GPU Application Framework — windowing, input, lifecycle, platform abstraction. Part of the GoGPU ecosystem.

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/gogpu's past year of commit activity
    Go 451 MIT 38 11 29 Updated Nov 25, 2026
  • wgpu Public

    Pure Go WebGPU Implementation

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/wgpu's past year of commit activity
    Go 206 MIT 34 4 3 Updated Nov 25, 2026
  • ui Public

    Pure Go GUI toolkit built on GoGPU — widgets, layouts, styling

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/ui's past year of commit activity
    Go 548 MIT 27 21 12 Updated Nov 25, 2026
  • g3d Public

    Pure Go 3D rendering library. Scene graph, PBR, GLTF. Zero CGO. Built on gogpu/wgpu.

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/g3d's past year of commit activity
    Go 30 MIT 8 1 3 Updated Nov 25, 2026
  • gpucontext Public

    Shared GPU infrastructure for the gogpu ecosystem (DeviceProvider, EventSource, Registry)

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/gpucontext's past year of commit activity
    Go 5 MIT 5 1 0 Updated Nov 25, 2026
  • .github Public

    GoGPU Organization Profile

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/.github's past year of commit activity
    2 0 0 0 Updated Nov 23, 2026
  • naga Public

    Pure Go Shader Compiler — WGSL to SPIR-V, MSL, GLSL, HLSL, DXIL. Zero CGO.

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/naga's past year of commit activity
    Go 61 MIT 15 0 0 Updated Nov 23, 2026
  • gputypes Public

    WebGPU type definitions for the gogpu ecosystem

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/gputypes's past year of commit activity
    Go 6 MIT 6 0 0 Updated Nov 22, 2026
  • systray Public

    Pure Go system tray library for Windows, macOS, and Linux. Zero CGO.

    Uh oh!

    There was an error while loading. Please reload this page.

    gogpu/systray's past year of commit activity
    Go 86 MIT 16 8 11 Updated Nov 22, 2026
View all repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Uh oh!

There was an error while loading. Please reload this page.

Most used topics

Loading…

Uh oh!

There was an error while loading. Please reload this page.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.