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 Stars


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.


Projects

Repository Description Status
gogpu Graphics framework — GPU abstraction, windowing, input v0.7.0
wgpu Pure Go WebGPU implementation (types, core, HAL) v0.6.0
naga Pure Go shader compiler — WGSL → SPIR-V/MSL v0.5.0
gg 2D graphics with GPU backend, scene graph, text v0.13.0
ui GUI widget toolkit Planned

Architecture

┌─────────────────────────────────────────────────────────────┐
│              Your Application                               │
├─────────────────────────────────────────────────────────────┤
│   gogpu/ui (GUI)   │   born-ml/born   │   Your Framework    │
├─────────────────────────────────────────────────────────────┤
│              gogpu/gg (2D Graphics)                         │
├─────────────────────────────────────────────────────────────┤
│              gogpu/gogpu (Graphics Framework)               │
│         GPU abstraction, windowing, input, math             │
├─────────────────────────────────────────────────────────────┤
│   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

Quick Start

package main

import "github.com/gogpu/gogpu"

func main() {
    app := gogpu.NewApp(gogpu.Config{
        Title:  "Hello GoGPU",
        Width:  800,
        Height: 600,
    })

    app.OnDraw(func(ctx *gogpu.Context) {
        ctx.Clear(gogpu.Black)
        ctx.DrawTriangle(/* ... */)
    })

    app.Run()
}

Note: API is in active development and will change.


Ecosystem

Project Organization Description
webgpu go-webgpu Zero-CGO WebGPU bindings
goffi go-webgpu Pure Go FFI library
born born-ml Pure Go ML framework

Roadmap

Foundation ✅

  • Zero-CGO WebGPU bindings (go-webgpu/webgpu)
  • Pure Go FFI (go-webgpu/goffi)

Phase 1 — Graphics ✅

  • Graphics framework (gogpu/gogpu) — Triangle, Textures, Dual Backend
  • Shader compiler (gogpu/naga) — WGSL → SPIR-V/MSL + compute shaders (~21K LOC)

Phase 2 — Pure Go WebGPU ✅

  • WebGPU types package (gogpu/wgpu/types)
  • Core validation & state (gogpu/wgpu/core)
  • HAL abstraction layer (gogpu/wgpu/hal)
  • OpenGL ES backend (gogpu/wgpu/hal/gles) — ~7.5K LOC, Windows + Linux
  • Vulkan backend (gogpu/wgpu/hal/vulkan) — ~27K LOC, cross-platform!
  • Software backend (gogpu/wgpu/hal/software) — ~10K LOC, full rasterizer!
  • Metal backend (gogpu/wgpu/hal/metal) — ~2.5K LOC, macOS/iOS!

Phase 3 — 2D Graphics ✅

  • 2D graphics library (gogpu/gg) — v0.13.0 with GPU text rendering!
  • Text rendering (v0.2.0) — FontSource/Face, MultiFace fallback
  • Images, Clipping, Compositing (v0.3.0) — DrawImage, Clip API, Porter-Duff
  • Layer API, Color Pipeline (v0.4.0) — PushLayer/PopLayer, HSL blend modes
  • SIMD Optimization (v0.5.0) — Fast div255, sRGB LUTs, batch blending (260x faster)
  • Parallel Rendering (v0.6.0) — TileGrid, WorkerPool, lock-free DirtyRegion!
  • Scene Graph (v0.7.0) — Retained mode, 13 shapes, filters, layer cache!
  • Backend Abstraction (v0.8.0) — RenderBackend interface, registry!
  • GPU Backend (v0.9.0) — Sparse Strips, WGSL shaders, 29 blend modes on GPU!
  • GPU Text Pipeline (v0.10.0) — Shaper, Layout, Bidi, 25+ scripts!
  • GPU Text Rendering (v0.13.0) — MSDF atlas, emoji, subpixel positioning!

Phase 3.5 — Platform Expansion ✅

  • Linux Wayland (v0.4.0) — Pure Go implementation, 5,700 LOC!
  • Linux X11 (v0.6.0) — Pure Go wire protocol, ~5K LOC!
  • macOS Cocoa (v0.5.0) — Pure Go via goffi, ~950 LOC!
  • Metal backend (wgpu v0.6.0) — Pure Go via goffi, ~2.5K LOC!
  • MSL shader output (naga v0.5.0) — WGSL → Metal Shading Language!

Phase 4 — GUI

  • Widget toolkit (gogpu/ui)
  • Layouts, styling, themes

Contributing

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

Areas where we need help:

  • Pure Go GPU backends (DX12)
  • WebGPU examples and tutorials
  • Documentation
  • GUI widget toolkit (gogpu/ui)

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 75

Repositories

Showing 6 of 6 repositories
  • gogpu Public

    Pure Go Graphics Framework — GPU power, Go simplicity

    gogpu/gogpu’s past year of commit activity
    Go 75 MIT 0 0 0 Updated Dec 24, 2025
  • wgpu Public

    Pure Go WebGPU Implementation

    gogpu/wgpu’s past year of commit activity
    Go 24 MIT 1 0 0 Updated Dec 24, 2025
  • 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 21 MIT 1 1 0 Updated Dec 24, 2025
  • naga Public

    Pure Go Shader Compiler — WGSL to SPIR-V

    gogpu/naga’s past year of commit activity
    Go 10 MIT 1 1 0 Updated Dec 24, 2025
  • .github Public

    GoGPU Organization Profile

    gogpu/.github’s past year of commit activity
    0 0 0 1 Updated Dec 25, 2025
  • ui Public

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

    gogpu/ui’s past year of commit activity
    13 MIT 0 0 0 Updated Dec 6, 2025

People

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

Top languages

Go

Most used topics

Loading…