W3C home > Mailing lists > Public > public-gpu@w3.org > October 2019

webgpu.h for using WebGPU in native and through emscripten

From: Corentin Wallez <cwallez@google.com>
Date: Wed, 30 Oct 2019 16:50:44 +0100
Message-ID: <CAGdfWNPoZHoogXbAHC=dSuKbjbMyfaUL_h8uDx6L_N=BK+6yZw@mail.gmail.com>
To: public-gpu <public-gpu@w3.org>
Hey all,

Recently we've been working on a C header called webgpu.h
<https://github.com/webgpu-native/webgpu-headers/blob/master/webgpu.h> that
is a translation of the WebGPU WebIDL. The intent is that it will allow
targeting WebGPU from C, C++ and languages with a C FFI via the following
paths:

   - On top of wgpu-native <https://github.com/gfx-rs/wgpu>, Firefox's
   implementation of WebGPU.
   - On top of Dawn <https://dawn.googlesource.com/dawn>, Chromium's
   implementation of WebGPU.
   - Through emscripten that will have an implementation of the header that
   converts to Javascript WebGPU calls.

The focus of the "GPU for the Web" community group is the Web API so work
related to webgpu.h cannot happen in it. We started a Github organization,
webgpu-native <https://github.com/webgpu-native/>, for everything WebGPU
outside of the Web and expect it to house projects like a node
implementation of WebGPU targeting webgpu.h, webgpu.h documentation,
translations from other native APIs to WebGPU and maybe more .

One huge benefit of multiple parties agreeing on webgpu.h is that it will
make WASM ports targeting WebGPU tractable: native applications will be
able to test in native using their regular tools against two WebGPU
implementations before compiling for the Web.

If you're interested in using WebGPU in native, please join the
conversation in webgpu-native/webgpu-headers
<https://github.com/webgpu-native/webgpu-headers>!

As a side-note, Dawn has completely transitioned to using webgpu.h (with
minor differences) and will soon delete the dawn.h and dawncpp.h headers so
if you're using them you should update to the new webgpu.h and webgpu_cpp.h
headers.

(in all the above "we" refers to engineers related to wgpu-native or Dawn
that participate in the webgpu-native Github organization).

Cheers,

Corentin
Received on Wednesday, 30 October 2019 15:51:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:52:27 UTC