Releases: go-webgpu/webgpu
Releases · go-webgpu/webgpu
v0.2.0: gputypes integration
gputypes Integration Release
This release integrates go-webgpu with the gogpu ecosystem through github.com/gogpu/gputypes.
⚠️ Breaking Changes
- All WebGPU types now use
github.com/gogpu/gputypesdirectly- Example:
wgpu.TextureFormatBGRA8Unorm→gputypes.TextureFormatBGRA8Unorm - Enum values now match webgpu.h specification
- Example:
✨ Added
- Integration with gogpu ecosystem via gputypes
- Full webgpu.h spec compliance for enum values
- Comprehensive conversion layer for wgpu-native v27 compatibility
- TextureFormat (~45 formats), VertexFormat (~30 formats)
- Wire structs with correct FFI padding (uint64 flags)
🐛 Fixed
- TextureFormat enum values mismatch (BGRA8Unorm was 0x17, now correct 0x1B)
- Compatibility with gogpu Rust backend
- All 11 examples now work correctly
📦 Dependencies
- goffi v0.3.7 (ARM64 Darwin improvements)
- wgpu-native v27.0.4.0
Migration Guide
// Before (v0.1.x)
import "github.com/go-webgpu/webgpu/wgpu"
format := wgpu.TextureFormatBGRA8Unorm
// After (v0.2.0)
import (
"github.com/go-webgpu/webgpu/wgpu"
"github.com/gogpu/gputypes"
)
format := gputypes.TextureFormatBGRA8UnormFull Changelog: v0.1.4...v0.2.0
v0.1.4
ARM64 Darwin Improvements
Update goffi v0.3.6 → v0.3.7
Improved
- Comprehensive ARM64 Darwin support — tested on M3 Pro hardware
- Nested struct handling — proper layout for complex struct types
- Mixed integer/float struct support — automatic struct layout computation
- Struct returns 9-16 bytes — Call8Float now returns both X0 and X1 registers
Fixed
- Segmentation fault in string output benchmarks on Darwin
Contributors
- @ppoage — ARM64 Darwin implementation, Objective-C test suite, assembly verification
v0.1.3
ARM64 HFA Fix
Update goffi v0.3.5 → v0.3.6
Fixed
- ARM64 HFA returns — NSRect (4×float64) now correctly returns all values on Apple Silicon
- Large struct returns — Structs >16 bytes properly use X8 register for implicit pointer passing
- Blank window on macOS ARM64 — GPU dimensions no longer return 0×0
Fixes gogpu#24
v0.1.2
v0.1.1 - Hotfix
Summary
Hotfix release with critical dependency update and infrastructure improvements.
Changed
- goffi: v0.3.1 → v0.3.3 (PointerType argument passing hotfix)
- golang.org/x/sys: v0.38.0 → v0.39.0
Fixed
- Critical bug in PointerType argument passing (goffi#4)
Infrastructure
- Branch protection enabled for
main - All changes now require Pull Requests
- Updated CONTRIBUTING.md with PR workflow
Upgrade
go get github.com/go-webgpu/webgpu@v0.1.1Full Changelog
v0.1.0 - Initial Release
go-webgpu v0.1.0
Zero-CGO WebGPU bindings for Go
First public release of go-webgpu - pure Go bindings for WebGPU via wgpu-native.
Highlights
- Zero CGO - Pure Go FFI using goffi
- Cross-platform - Windows, Linux, macOS (x64 and ARM64)
- Comprehensive API - ~80% WebGPU coverage
- 11 Examples - From basic triangle to compute shaders
Features
Core API
- WebGPU Instance, Adapter, Device creation
- Buffer creation and management (MapAsync, GetMappedRange, Unmap)
- Texture creation and management (2D, depth, render targets)
- Sampler API with filtering and address modes
- Shader module compilation (WGSL)
Pipelines
- Compute Pipeline with workgroups
- Render Pipeline with vertex/fragment stages
- Pipeline Layout and Bind Group Layout
- Bind Groups for resource binding
Rendering
- Command Encoder and Queue submission
- Render Pass with color and depth attachments
- Vertex buffers with custom layouts
- Index buffers (Uint16, Uint32)
- Depth buffer support
- MRT (Multiple Render Targets)
- RenderBundle API
Advanced Features
- Instanced rendering
- Indirect drawing (DrawIndirect, DrawIndexedIndirect)
- QuerySet API for GPU timestamps
- Error Handling API (PushErrorScope, PopErrorScope)
Platform Support
| Platform | Architecture | Status |
|---|---|---|
| Windows | x64 | ✅ |
| Linux | x64 | ✅ |
| Linux | ARM64 | ✅ |
| macOS | x64 | ✅ |
| macOS | ARM64 (Apple Silicon) | ✅ |
Installation
go get github.com/go-webgpu/webgpuDownload wgpu-native and place in your project or PATH.
Dependencies
- goffi v0.3.1
- wgpu-native v24.0.0.2