Earlier quoted context omitted.
And what do you call when you call that API? wgpu in Firefox and Dawn in Chrome. wgpu is an implementation of webgpu with the raw rust bindings rather than the C-API it also provides called by Firefox. Unless you want to dig into the implementation details of the various subcrates.
> wgpu in Firefox Ah, sorry, I didn't know that, thanks. On Chrome it uses either WebGL2 or WebGPU. When running in a web browser (by compilation to WebAssembly) without the "webgl" feature enabled, wgpu relies on the browser's own WebGPU implementation. https://github.com/gfx-rs/wgpu?tab=readme-ov-file#tracking-t...
So if you're writing rust with wgpu and you target wasm and run it in firefox you will have a wasm program that calls the browser's implementation of webgpu which is the same wgpu crate you used just built in the other way.
If you run it in Chrome instead it will use Dawn.
And in native land wgpu and dawn are incompatible and have different C-apis. One uses uint32_t everywhere and the other size_t. So they're the same on 32bit platforms like WASM but not on modern native platforms