I am trying to understand the general concept of wgpu and Dawn.
As I understand it, there are two main implementations of the WebGPU standard from Khronos: wgpu from Mozilla and Dawn from Google.
Do I understand correctly that:
-wgpu: is it a C/Rust library that can be compiled from into an executable file of the Operating System and into WebAssembly code for the browser ?
-Dawn: Can only create Web Assembly code for the browser.
And I also wanted to ask: can wgpu create WebAssembly code, does wgpu convert only its API code or C/C++ code too? I can't figure it out.
Basically,
wgpu
anddawn
are the WebGPU spec implementations forFirefox
andChrome
browsers respectively.Currently, dawn is the most advanced implementation of the WebGPU spec, and will officially support WebGPU 1.0 in Chrome around May 2023.
A wgpu-based project compiled as a
wasm
target will be able to run on all WebGPU-enabled browsers.More than that, the
wgpu
APIs is based on the WebGPU spec, but it can runs natively on Vulkan, Metal, Dx12, Dx11, and OpenGLES, and also provides additional features support for native applications.For example, wgpu-in-app demonstrates how easy it is to integrate wgpu into iOS and/or Android app