Skip to content

feat: ADR-038 Rust backend at public API level (browser pattern, v0.29.0)#198

Merged
kolkov merged 1 commit into
mainfrom
feat/adr-038-rust-backend-browser-pattern
May 27, 2026
Merged

feat: ADR-038 Rust backend at public API level (browser pattern, v0.29.0)#198
kolkov merged 1 commit into
mainfrom
feat/adr-038-rust-backend-browser-pattern

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented May 27, 2026

Summary

  • Triple-backend architecture — build tags select implementation: default (Pure Go core→HAL), -tags rust (go-webgpu/webgpu → wgpu-native v29), js,wasm (Browser WebGPU)
  • 24 new _rust.go files with platform-specific surface creation (Windows HWND, macOS Metal, Linux X11/Wayland)
  • ADR-039: Remove speculative Hal escape hatches* — HalTexture, HalTextureView, HalQueue removed (zero production callers)
  • Updated docs — README, ARCHITECTURE.md, CHANGELOG, ROADMAP

Details

  • go-webgpu/webgpu v0.5.1, goffi v0.5.2, gputypes v0.5.0, x/sys v0.45.0
  • 12 features mapped (DepthClipControl, TextureCompression, TimestampQuery, etc.)
  • Full AdapterInfo mapping (Backend, DeviceType, VendorID, DeviceID)
  • Platform surfaces: Windows (HWND), macOS (CAMetalLayer), Linux (X11 + Wayland detection)
  • All P0/P1 issues from code review resolved
  • Lint: 0 issues on both native and rust paths

Test plan

  • go build ./... — native OK
  • go build -tags rust ./... — rust OK
  • go test . — native tests pass
  • go vet . and go vet -tags rust . — clean
  • golangci-lint run and golangci-lint run --build-tags rust — 0 issues
  • Visual: triangle example renders on native (Vulkan) and Rust (wgpu-native v29)

Triple-backend architecture: build tags select implementation.
- (default) Native Go: core → HAL → Vulkan/Metal/DX12/GLES/Software
- (-tags rust) Rust FFI: go-webgpu/webgpu v0.5.0 → wgpu-native v29
- (js,wasm) Browser: syscall/js → Browser WebGPU API

24 new _rust.go files with platform-specific surface creation
(Windows HWND, macOS Metal, Linux X11/Wayland).

ADR-039: Remove speculative Hal* escape hatches (HalTexture,
HalTextureView, HalQueue) — zero production callers.

deps: goffi v0.5.1→v0.5.2, x/sys v0.44.0→v0.45.0
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov kolkov force-pushed the feat/adr-038-rust-backend-browser-pattern branch from ab492aa to 8f8a82a Compare May 27, 2026 09:52
@kolkov kolkov merged commit b2e4e38 into main May 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant