v0.4.0
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
ptrFromUintptrhelper — eliminates all 15 pre-existinggo vetunsafe.Pointer warnings via double-indirection pattern- 85 new tests (
TestNullGuard_*) — comprehensive coverage for every guard, CI-safe
Library Loading Improvements
WGPU_NATIVE_PATHenv var — override library search path for custom wgpu-native locationsloadLibraryreturns(Library, error)— proper error propagation instead of silent failures- Windows: eager DLL loading via
dll.Load()— errors surface atInit(), not at first FFI call - Descriptive error messages —
Init()reports library path tried and suggestsWGPU_NATIVE_PATHoverride
CI Improvements
- wgpu-native binary downloaded in all CI workflows — tests run against real library, no skips
- Removed
-unsafeptr=falsego vet workaround — all warnings properly fixed WGPU_NATIVE_PATHenv propagated viaGITHUB_ENVfor 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