Whether WebGPU can be used here. Natively wgpu-native is linked, so this is true (an adapter may still be missing: webgpu_request_adapter returns null then). In the browser it is false when the page has no WebGPU or cannot suspend the program while it waits (JSPI); a program can then do something else instead of failing at its first wgpu call.
webgpu_available :: () -> bool
Whether WebGPU can be used here. Natively wgpu-native is linked, so this is true (an adapter may still be missing: webgpu_request_adapter returns null then). In the browser it is false when the page has no WebGPU or cannot suspend the program while it waits (JSPI); a program can then do something else instead of failing at its first wgpu call.
Returns
- bool