Skip to content

feat: typed Device/Queue interfaces, remove HalProvider (v0.10.0)#11

Merged
kolkov merged 4 commits intomainfrom
feat/v0.10.0-typed-interfaces
Mar 15, 2026
Merged

feat: typed Device/Queue interfaces, remove HalProvider (v0.10.0)#11
kolkov merged 4 commits intomainfrom
feat/v0.10.0-typed-interfaces

Conversation

@kolkov
Copy link
Contributor

@kolkov kolkov commented Mar 15, 2026

Summary

  • Removed HalProvider interface (HalDevice/HalQueue with any return)
  • Changed Device, Queue, Adapter, Surface, Instance to minimal type-token interfaces
  • Consumers type-assert to *wgpu.Device for full API — Go "accept interfaces, return structs"

Test plan

  • go build ./... passes
  • golangci-lint run — 0 issues
  • CI

kolkov added 4 commits March 11, 2026 03:01
…ctor

Size() now returns logical points, not physical pixels.
Updated interface docs, NullWindowProvider, CHANGELOG, README examples.
BREAKING: HalProvider interface deleted. HalDevice()/HalQueue() with any
returns removed entirely.

Device, Queue, Adapter, Surface, Instance converted to minimal type-token
interfaces. Enables Go implicit interface satisfaction — *wgpu.Device
implements gpucontext.Device without gpucontext importing wgpu.

Pattern: accept interfaces, return structs (Go standard library pattern).
Consumers type-assert to *wgpu.Device when they need full API access.

Zero any in the device provider chain.
@kolkov kolkov merged commit 2e43ab9 into main Mar 15, 2026
9 checks passed
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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