Commit c6f5fcf
feat(webgpu_x): lazy-load Deno.dlopen via Proxy in FFI bindings
Wraps the Deno.dlopen call and path computation inside a _loadLib()
function with null-check caching. A Proxy object exposes all symbols
lazily so the native library is only opened on first actual function
call, not at module import time.
This prevents `deno cache` from failing during Docker image builds
where libwebgpu_x.so has not been compiled yet.
Also updates gen_bindings.ts with a post-processing step that
automatically applies this lazy loader pattern on every future
regeneration of bindings.ts, so the pattern is preserved even after
running the binding generator again.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 3850a39 commit c6f5fcf
2 files changed
Lines changed: 834 additions & 760 deletions
0 commit comments