{"id":35202845,"url":"https://github.com/go-webgpu/webgpu","last_synced_at":"2026-03-02T08:05:07.793Z","repository":{"id":326514651,"uuid":"1097248904","full_name":"go-webgpu/webgpu","owner":"go-webgpu","description":"Zero-CGO WebGPU bindings for Go — GPU-accelerated graphics and compute in pure Go","archived":false,"fork":false,"pushed_at":"2025-12-29T09:43:47.000Z","size":167,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-01T08:35:09.374Z","etag":null,"topics":["directx12","ffi","gamedev","go","golang","gpu","graphics","metal","vulkan","webgpu","wgpu","zero-cgo"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/go-webgpu/webgpu","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-webgpu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-15T20:13:45.000Z","updated_at":"2025-12-29T22:53:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/go-webgpu/webgpu","commit_stats":null,"previous_names":["go-webgpu/webgpu"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/go-webgpu/webgpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-webgpu%2Fwebgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-webgpu%2Fwebgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-webgpu%2Fwebgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-webgpu%2Fwebgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-webgpu","download_url":"https://codeload.github.com/go-webgpu/webgpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-webgpu%2Fwebgpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directx12","ffi","gamedev","go","golang","gpu","graphics","metal","vulkan","webgpu","wgpu","zero-cgo"],"created_at":"2025-12-29T12:12:06.349Z","updated_at":"2026-02-09T12:19:00.226Z","avatar_url":"https://github.com/go-webgpu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-webgpu\n\n\u003e **Zero-CGO WebGPU bindings for Go — GPU-accelerated graphics and compute in pure Go**\n\n[![GitHub Release](https://img.shields.io/github/v/release/go-webgpu/webgpu?include_prereleases\u0026style=flat-square\u0026logo=github\u0026color=blue)](https://github.com/go-webgpu/webgpu/releases/latest)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/go-webgpu/webgpu?style=flat-square\u0026logo=go)](https://go.dev/dl/)\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-webgpu/webgpu.svg)](https://pkg.go.dev/github.com/go-webgpu/webgpu)\n[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/go-webgpu/webgpu/test.yml?branch=main\u0026style=flat-square\u0026logo=github-actions\u0026label=CI)](https://github.com/go-webgpu/webgpu/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-webgpu/webgpu?style=flat-square)](https://goreportcard.com/report/github.com/go-webgpu/webgpu)\n[![License](https://img.shields.io/github/license/go-webgpu/webgpu?style=flat-square)](LICENSE)\n[![GitHub Stars](https://img.shields.io/github/stars/go-webgpu/webgpu?style=flat-square\u0026logo=github)](https://github.com/go-webgpu/webgpu/stargazers)\n[![GitHub Issues](https://img.shields.io/github/issues/go-webgpu/webgpu?style=flat-square\u0026logo=github)](https://github.com/go-webgpu/webgpu/issues)\n\nPure Go WebGPU bindings using [goffi](https://github.com/go-webgpu/goffi) + [wgpu-native](https://github.com/gfx-rs/wgpu-native). No CGO required.\n\n## Status\n\n**Beta** — Comprehensive API ready for testing and feedback.\n\n| Feature | Status |\n|---------|--------|\n| Instance, Adapter, Device | ✅ |\n| Buffers (vertex, index, uniform, storage) | ✅ |\n| Textures, Samplers, Storage Textures | ✅ |\n| Render Pipelines | ✅ |\n| Compute Pipelines | ✅ |\n| Depth Buffer | ✅ |\n| MRT (Multiple Render Targets) | ✅ |\n| Instanced Rendering | ✅ |\n| Indirect Drawing (GPU-driven) | ✅ |\n| RenderBundle (pre-recorded commands) | ✅ |\n| Cross-Platform Surface (Win/Linux/macOS) | ✅ |\n| Error Handling (error scopes) | ✅ |\n| QuerySet (GPU timestamps) | ✅ |\n| BindGroupLayout (explicit) | ✅ |\n| 3D Math (Mat4, Vec3) | ✅ |\n\n## Requirements\n\n- Go 1.25+\n- wgpu-native v27.0.4.0 ([download](https://github.com/gfx-rs/wgpu-native/releases))\n\n## Installation\n\n```bash\ngo get github.com/go-webgpu/webgpu\n```\n\nDownload wgpu-native and place `wgpu_native.dll` (Windows) or `libwgpu_native.so` (Linux) in your project directory or system PATH.\n\n## Type System\n\nThis library uses [gputypes](https://github.com/gogpu/gputypes) for WebGPU type definitions, ensuring compatibility with the [gogpu ecosystem](https://github.com/gogpu) and webgpu.h specification.\n\n```go\nimport (\n    \"github.com/go-webgpu/webgpu/wgpu\"\n    \"github.com/gogpu/gputypes\"\n)\n\n// Use gputypes for WebGPU enums\nconfig.Format = gputypes.TextureFormatBGRA8Unorm\nbuffer.Usage = gputypes.BufferUsageVertex | gputypes.BufferUsageCopyDst\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n\n    \"github.com/go-webgpu/webgpu/wgpu\"\n)\n\nfunc main() {\n    // Initialize library\n    if err := wgpu.Init(); err != nil {\n        log.Fatal(err)\n    }\n\n    // Create WebGPU instance\n    instance, err := wgpu.CreateInstance(nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer instance.Release()\n\n    // Request GPU adapter\n    adapter, err := instance.RequestAdapter(nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer adapter.Release()\n\n    fmt.Printf(\"Adapter: %#x\\n\", adapter.Handle())\n}\n```\n\n## Examples\n\n| Example | Description |\n|---------|-------------|\n| [triangle](examples/triangle) | Basic triangle rendering |\n| [colored-triangle](examples/colored-triangle) | Vertex colors and buffers |\n| [textured-quad](examples/textured-quad) | Textures, samplers, index buffers |\n| [rotating-triangle](examples/rotating-triangle) | Uniform buffers, animation |\n| [cube](examples/cube) | 3D rendering with depth buffer |\n| [instanced](examples/instanced) | Instanced rendering (25 objects in 1 draw call) |\n| [compute](examples/compute) | Compute shader parallel processing |\n| [indirect](examples/indirect) | GPU-driven rendering (DrawIndirect) |\n| [render_bundle](examples/render_bundle) | Pre-recorded draw commands |\n| [timestamp_query](examples/timestamp_query) | GPU profiling with timestamps |\n| [mrt](examples/mrt) | Multiple Render Targets |\n| [error_handling](examples/error_handling) | Error scopes API |\n\nRun examples:\n```bash\ncd examples/triangle \u0026\u0026 go run .\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────┐\n│            Your Go Application          │\n├─────────────────────────────────────────┤\n│     go-webgpu (this package)            │\n│     - Zero CGO                          │\n│     - Pure Go FFI via goffi             │\n├─────────────────────────────────────────┤\n│     wgpu-native (Rust WebGPU)           │\n├─────────────────────────────────────────┤\n│     Vulkan / Metal / DX12 / OpenGL      │\n└─────────────────────────────────────────┘\n```\n\n## Looking for Pure Go WebGPU?\n\nThis project uses FFI bindings to wgpu-native. If you're looking for a **100% Pure Go** WebGPU implementation (no native dependencies), check out:\n\n👉 **[github.com/gogpu](https://github.com/gogpu)** — Pure Go GPU ecosystem\n\n| Project | Description |\n|---------|-------------|\n| [gogpu/wgpu](https://github.com/gogpu/wgpu) | Pure Go WebGPU implementation |\n| [gogpu/naga](https://github.com/gogpu/naga) | Pure Go shader compiler (WGSL/SPIR-V) |\n| [gogpu/gogpu](https://github.com/gogpu/gogpu) | High-level GPU compute framework |\n| [gogpu/gg](https://github.com/gogpu/gg) | Pure Go graphics library |\n\n## Dependencies\n\n- [goffi](https://github.com/go-webgpu/goffi) — Pure Go FFI for callbacks\n- [wgpu-native](https://github.com/gfx-rs/wgpu-native) — Rust WebGPU implementation\n- [golang.org/x/sys](https://pkg.go.dev/golang.org/x/sys) — Platform-specific syscalls\n\n## License\n\nMIT\n\n## Contributing\n\nContributions welcome! Please open an issue or PR.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-webgpu%2Fwebgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-webgpu%2Fwebgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-webgpu%2Fwebgpu/lists"}