Skip to content
@gogpu

GoGPU

Pure Go GPU Computing Ecosystem — Graphics, Shaders, ML. Zero CGO.

GoGPU Logo

GoGPU

Pure Go GPU Computing Ecosystem
GPU power, Go simplicity. Zero CGO.

Go Version License Pure Go Discussions


Why GoGPU?

Inspired by this discussion on r/golang, we're building the GPU computing ecosystem that Go deserves — from low-level graphics to high-level GUI, all with zero CGO.


Ecosystem

Library Purpose Version Stars Issues PRs
gg 2D graphics, Canvas API, GPU compute
wgpu Pure Go WebGPU (Vulkan/Metal/GLES/DX12)
naga WGSL → SPIR-V/MSL/GLSL/HLSL compiler
gogpu Graphics framework, windowing
gpucontext Shared interfaces (DeviceProvider, EventSource)
gputypes WebGPU types (webgpu.h spec compliant)
gg-pdf PDF export backend for gg recording
gg-svg SVG export backend for gg recording
ui GUI toolkit (planning)

Pure Go | Zero CGO | Cross-platform


Architecture

┌─────────────────────────────────────────────────────────────┐
│              Your Application                               │
├─────────────────────────────────────────────────────────────┤
│   gogpu/ui (GUI)   │   born-ml/born   │   Your Framework    │
├─────────────────────────────────────────────────────────────┤
│              gogpu/gg (2D Graphics + Recording)             │
│                 ↓ export to ↓                               │
│           gg-pdf (PDF)    gg-svg (SVG)                      │
├─────────────────────────────────────────────────────────────┤
│              gogpu/gogpu (Graphics Framework)               │
│         GPU abstraction, windowing, input, math             │
├─────────────────────────────────────────────────────────────┤
│    gogpu/gpucontext (Shared Interfaces)                     │
│       DeviceProvider, EventSource, Registry                 │
├─────────────────────────────────────────────────────────────┤
│    gogpu/gputypes (WebGPU Types, webgpu.h compliant)        │
│       TextureFormat, BufferUsage, PresentMode, etc.         │
├─────────────────────────────────────────────────────────────┤
│   go-webgpu/webgpu (FFI)    →    gogpu/wgpu (Pure Go)       │
├─────────────────────────────────────────────────────────────┤
│              Vulkan  │  Metal  │  DX12  │  OpenGL           │
└─────────────────────────────────────────────────────────────┘

Key Features

Feature Description
Zero CGO No C compiler required, simple go build
WebGPU API Modern, portable GPU abstraction
Layered Design Use only what you need
Pure Go Goal Gradually replacing FFI with native Go
webgpu.h Compliant Binary-compatible with wgpu-native

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:

import "github.com/gogpu/gg/integration/ggcanvas"

canvas, _ := ggcanvas.New(app.GPUContextProvider(), 800, 600)
defer canvas.Close()

cc := canvas.Context()
cc.SetRGB(1, 0, 0)
cc.DrawCircle(400, 300, 100)
cc.Fill()

canvas.RenderTo(dc) // Draw to gogpu window

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)

Status

Component Status Description
gputypes ✅ Stable WebGPU types (webgpu.h spec compliant)
gpucontext ✅ Stable Shared interfaces (zero deps)
wgpu ✅ Stable Vulkan, Metal, GLES, Software backends
naga ✅ Stable SPIR-V, MSL, GLSL, HLSL outputs
gg ✅ Stable 2D graphics + recording + ggcanvas
gg-pdf ✅ Stable PDF export backend for gg
gg-svg ✅ Stable SVG export backend for gg
gogpu ✅ Stable Graphics framework, windowing
ui 🚧 Planning GUI widget toolkit

Platforms

Platform Vulkan Metal GLES Software
Windows
macOS
Linux (X11)
Linux (Wayland)

See individual project ROADMAP.md files for detailed roadmaps.


Contributing

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

Areas where we need help:

  • WebGPU examples and tutorials
  • Documentation
  • GUI widget toolkit (gogpu/ui)
  • Cross-platform testing (macOS, Linux)

License

All projects are licensed under the MIT License.


Building the GPU computing ecosystem Go deserves
github.com/gogpu

Pinned Loading

  1. gogpu gogpu Public

    Pure Go Graphics Framework — GPU power, Go simplicity

    Go 148 2

Repositories

Showing 10 of 10 repositories
  • gg Public

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

    gogpu/gg’s past year of commit activity
    Go 43 MIT 2 2 (1 issue needs help) 0 Updated Feb 6, 2026
  • gogpu Public

    Pure Go Graphics Framework — GPU power, Go simplicity

    gogpu/gogpu’s past year of commit activity
    Go 148 MIT 2 2 0 Updated Feb 5, 2026
  • gpucontext Public

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

    gogpu/gpucontext’s past year of commit activity
    Go 0 MIT 0 0 0 Updated Feb 5, 2026
  • .github Public

    GoGPU Organization Profile

    gogpu/.github’s past year of commit activity
    0 0 0 1 Updated Feb 3, 2026
  • gg-svg Public

    SVG export backend for gg's recording system

    gogpu/gg-svg’s past year of commit activity
    Go 0 MIT 0 0 0 Updated Feb 3, 2026
  • gg-pdf Public

    PDF export backend for gg's recording system

    gogpu/gg-pdf’s past year of commit activity
    Go 0 MIT 0 0 0 Updated Feb 3, 2026
  • wgpu Public

    Pure Go WebGPU Implementation

    gogpu/wgpu’s past year of commit activity
    Go 47 MIT 4 0 0 Updated Feb 1, 2026
  • naga Public

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

    gogpu/naga’s past year of commit activity
    Go 17 MIT 3 0 0 Updated Jan 31, 2026
  • gputypes Public

    WebGPU type definitions for the gogpu ecosystem

    gogpu/gputypes’s past year of commit activity
    Go 0 MIT 0 0 0 Updated Jan 29, 2026
  • ui Public

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

    gogpu/ui’s past year of commit activity
    Go 40 MIT 0 0 0 Updated Jan 16, 2026

People

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

Top languages

Go