You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebGPU is a new web platform feature that allows to use graphics hardware power from JavaScript. With it, you can write algorithms in a shading language and take advantage of the high parallelism of GPUs to make fast computations.
The WebGPU API is being implemented by Chrome, Firefox and Safari.
What is the feature you are proposing to solve the problem?
I'm proposing that we work towards making the API available in standard installations under navigator.gpu, like in browsers.
Chrome's implementation is being developed as a standalone C++ library called Dawn.
They also have written Node.js bindings for it.
/cc @Kangz@ben-clayton What do you think about this?
Whoever wants to use WebGPU in node should just use dawn.node and not bother reimplementing things. We use it for internal testing against the WebGPU CTS so it basically feature complete except for some device creation logic and swapchains. I don't know that it should be bundled in standard node installations: it's not going to work everywhere because you need a GPU or Swiftshader to make WebGPU run.
I renamed the issue to "Expose WebGPU" because I'm really not suggesting we reimplement everything.
What I'd like to know is whether other people think it's a good idea to try and include dawn/dawn.node in standard Node.js installations (even if it may end up being available on incompatible systems).
BTW, I would be interested in trying dawn.node separately, but I haven't found any public build of it.
It doesn't exist yet, mostly because the Dawn contributors don't have experience on how to do it (and because it only recently reached good enough quality). I'll volunteer @DeltaEvo to figure out how to setup dawn.node to be published. The difficult is to do it on multi OSes since the binary is OS depend.
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
OTOH, if no one is actively working on it, then we may just as well close it out.
I would summarize the consensus as: no strong resistance against inclusion in core but no strong desire either. Third-party packages exist and are likely Good Enough(TM).
if there is enough interest we may be able to set up an auto-published npm module.
Reacted by Joachim Wester, Bela Babik, vExcess, Guilherme Bernal, Christoph Pahmeyer, Valerio De Benedetto, XorTdsc, Cody Bennett, lin72h, ingria and 8 more
Reacted by Matt Hargett, lin72h, Izaak Schroeder, Cormick, Ali Moezzi, John Sim, Zheng Chaojian and Devin Neal
Activity
Kangz commentedon Apr 28, 2022
Whoever wants to use WebGPU in node should just use dawn.node and not bother reimplementing things. We use it for internal testing against the WebGPU CTS so it basically feature complete except for some device creation logic and swapchains. I don't know that it should be bundled in standard node installations: it's not going to work everywhere because you need a GPU or Swiftshader to make WebGPU run.
[-]Implement WebGPU?[/-][+]Expose WebGPU?[/+]targos commentedon Apr 28, 2022
I renamed the issue to "Expose WebGPU" because I'm really not suggesting we reimplement everything.
What I'd like to know is whether other people think it's a good idea to try and include dawn/dawn.node in standard Node.js installations (even if it may end up being available on incompatible systems).
BTW, I would be interested in trying dawn.node separately, but I haven't found any public build of it.
bnoordhuis commentedon Apr 28, 2022
Deno supports WebGPU and ML people seem to love it.
An alternative to Dawn is wgpu / wgpu-native. In Rust, yes, but with broader community support and used outside Chrome/Chromium.
mscdex commentedon Apr 28, 2022
I think we should leave this to userland.
Kangz commentedon Apr 28, 2022
As long as there is a package that's easy to add for developers, it seems that userland would be fine, no?
targos commentedon Apr 29, 2022
Maybe, at least as a first step. Does such a package exist?
Kangz commentedon Apr 29, 2022
It doesn't exist yet, mostly because the Dawn contributors don't have experience on how to do it (and because it only recently reached good enough quality). I'll volunteer @DeltaEvo to figure out how to setup dawn.node to be published. The difficult is to do it on multi OSes since the binary is OS depend.
bnoordhuis commentedon May 1, 2022
There's already a Dawn binding but it's pretty buggy and doesn't look actively maintained (last update 2 years ago.)
Kangz commentedon May 2, 2022
@maierfelix would you be interested in transitioning the
webgpupackage to be based on dawn.node? Let's chat on Matrix.github-actions commentedon Oct 30, 2022
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
2 remaining items
github-actions commentedon Apr 29, 2023
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
benjamingr commentedon Apr 29, 2023
@nodejs/github-bot (hope that's the right ping), it looks like the never-stale label is broken ^
bnoordhuis commentedon Apr 29, 2023
OTOH, if no one is actively working on it, then we may just as well close it out.
I would summarize the consensus as: no strong resistance against inclusion in core but no strong desire either. Third-party packages exist and are likely Good Enough(TM).
benjamingr commentedon May 1, 2023
Closing as not planned (as this is not completed)
devsnek commentedon Aug 24, 2023
For anyone wandering past in need of webgpu, I updated dawn to include a proper node.js module entrypoint, exposing a
gpuobject analogous tonavigator.gpu: https://dawn.googlesource.com/dawn/+/refs/heads/main/src/dawn/node/index.jsif there is enough interest we may be able to set up an auto-published npm module.
matthargett commentedon Oct 25, 2023
Yes, please make a blessed npm package!
iampi31415 commentedon Apr 16, 2025
So currently one can use this library which exposes dawn (whatever this means) ?
Is there any way to use the Rust counterpart ?