Skip to content

fix: Surface API contract enforcement + Metal checkptr (#280, #281) - #282

Merged
kolkov merged 11 commits into
mainfrom
fix/281-surface-contract
Jul 29, 2026
Merged

fix: Surface API contract enforcement + Metal checkptr (#280, #281)#282
kolkov merged 11 commits into
mainfrom
fix/281-surface-contract

Conversation

@kolkov

@kolkov kolkov commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • go build ./... — native
  • GOOS=js GOARCH=wasm go build . — browser
  • All tests pass (25 packages)
  • golangci-lint — 0 issues
  • CI cross-compile job added for browser + Rust backends

kolkov added 9 commits July 22, 2026 17:45
…st stubs + CI cross-compile (#281)

Add compile-time interface assertion to all three Surface backends ensuring
public API parity (ADR-047). Missing methods return clear errors or no-op.

Browser stubs: PresentPixels, WritePixels, SetPrepareFrame, SetPresentsWithTransaction
Rust stubs: PresentPixels, WritePixels, SetPresentsWithTransaction

CI: cross-compile job for GOOS=js/wasm (browser) and -tags=rust backends.

Fixes #281.
…checkptr under -race (#280)

Replace unsafe.Pointer(blockPtr + 32) with unsafe.Add(unsafe.Pointer(blockPtr), 32)
at all 4 block callback trampolines. unsafe.Add preserves allocation provenance
for checkptr (Go 1.17+), fixing fatal abort under go test -race on Metal compute.

Fixes #280.
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov force-pushed the fix/281-surface-contract branch from 96fdc7f to 0746233 Compare July 29, 2026 15:11
Third-party setup-android action (v3/v4) crashes: v3 deprecated Node16,
v4 cmdline-tools 20.0 Preview license incompatible with non-interactive CI.
Use runner's pre-installed SDK (cmdline-tools/latest) directly.
yes | sdkmanager --licenses handles Preview license acceptance.
@kolkov
kolkov force-pushed the fix/281-surface-contract branch from 0746233 to bdd3646 Compare July 29, 2026 15:12
@kolkov
kolkov merged commit 0d02699 into main Jul 29, 2026
15 checks passed
@kolkov
kolkov deleted the fix/281-surface-contract branch July 29, 2026 15:23
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