Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Feb 13:48
· 4 commits to main since this release
5c78684

What's Changed

FFI Hardening

  • Null handle guards on all public FFI methods (27 files) — prevents SIGSEGV when passing nil or released objects to wgpu-native
  • ptrFromUintptr helper — eliminates all 15 pre-existing go vet unsafe.Pointer warnings via double-indirection pattern
  • 85 new tests (TestNullGuard_*) — comprehensive coverage for every guard, CI-safe

Library Loading Improvements

  • WGPU_NATIVE_PATH env var — override library search path for custom wgpu-native locations
  • loadLibrary returns (Library, error) — proper error propagation instead of silent failures
  • Windows: eager DLL loading via dll.Load() — errors surface at Init(), not at first FFI call
  • Descriptive error messagesInit() reports library path tried and suggests WGPU_NATIVE_PATH override

CI Improvements

  • wgpu-native binary downloaded in all CI workflows — tests run against real library, no skips
  • Removed -unsafeptr=false go vet workaround — all warnings properly fixed
  • WGPU_NATIVE_PATH env propagated via GITHUB_ENV for cross-step visibility

Bug Fixes

  • 15 go vet "possible misuse of unsafe.Pointer" warnings eliminated
  • Silent library loading failures now properly reported

Full Changelog: v0.3.2...v0.4.0