Skip to content

Commit d704c56

Browse files
authored
Update Emdawnwebgpu port to v20250531.224602 (#24466)
Release page: <https://github.com/google/dawn/releases/tag/v20250531.224602> Emdawnwebgpu releases now generate these "remoteport" files, which can be copied directly into Emscripten. The README is just included in the file for people who download it from Dawn's releases page because it's a single file download - I don't expect `--use-port=emdawnwebgpu` users to read it. I thought about including a link to the README (<https://dawn.googlesource.com/dawn/+/ea66c0fa309f01f2ba1ec2fd2c680cc992eaf72a/src/emdawnwebgpu/pkg/README.md>) in the `DESCRIPTION` but I don't think the description is user-visible? (It doesn't show up in `--show-ports`.) It _would_ be nice to make sure the readme is findable by users. This is tested by `test_remote_ports` and `test_emdawnwebgpu_link_test`.
1 parent 765098c commit d704c56

File tree

1 file changed

+66
-3
lines changed

1 file changed

+66
-3
lines changed

tools/ports/emdawnwebgpu.py

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,77 @@
33
# University of Illinois/NCSA Open Source License. Both these licenses can be
44
# found in the LICENSE file.
55

6+
r"""
7+
# Emdawnwebgpu
68
7-
TAG = 'v20250516.124039'
9+
Emdawnwebgpu is Dawn's implementation of webgpu.h for Emscripten (on top of the
10+
WebGPU JS API). It is a fork of Emscripten's original `USE_WEBGPU` bindings,
11+
and while it is maintained in Dawn, it works in any browser supporting WebGPU
12+
(modulo individual feature support).
13+
14+
The package includes all of the necessary files to use
15+
`<webgpu/webgpu.h>` and the Dawn-style `<webgpu/webgpu_cpp.h>` with Emscripten.
16+
17+
Find new versions of this package at <https://github.com/google/dawn/releases>.
18+
19+
If you find any issue with this release, please verify it in the latest release,
20+
and then report it at <https://crbug.com/new?component=1570785&noWizard=True>.
21+
22+
## How to use this package
23+
24+
First, start with either:
25+
26+
- A "remote" port file `emdawnwebgpu-v*.remoteport.py` (requires Emscripten 4.0.10+).
27+
- An `emdawnwebgpu_pkg` containing a local port file `emdawnwebgpu.port.py`.
28+
(Either from a pre-built zip release, or from a Dawn build output directory.)
29+
30+
## How to use this package (local or remote)
31+
32+
Pass the following flag to `emcc`, during both compile and link, to set the
33+
include paths and link the implementation:
34+
35+
--use-port=path/to/emdawnwebgpu_port_or_remoteport_file.py
36+
37+
If (and only if) using Emscripten before 4.0.7, also pass this flag during link:
38+
39+
--closure-args=--externs=path/to/emdawnwebgpu_pkg/webgpu/src/webgpu-externs.js
40+
41+
## Port options
42+
43+
Options can be set by appending `:key1=value:key2=value` to `--use-port`.
44+
For information about port options, run:
45+
46+
emcc --use-port=emdawnwebgpu:help
47+
emcc --use-port=path/to/emdawnwebgpu.port.py:help
48+
emcc --use-port=path/to/emdawnwebgpu-*.remoteport.py:help
49+
50+
### C++ bindings
51+
52+
By default, C++ bindings are provided in the include path. Note that unlike
53+
`webgpu.h`, these are not intended to be fully stable. If you don't want these
54+
for any reason (you have custom bindings, you're using a pinned snapshot of
55+
`webgpu_cpp.h`, etc.), you can set the option `cpp_bindings=false`:
56+
57+
--use-port=emdawnwebgpu:cpp_bindings=false
58+
--use-port=path/to/emdawnwebgpu.port.py:cpp_bindings=false
59+
--use-port=path/to/emdawnwebgpu-*.remoteport.py:cpp_bindings=false
60+
61+
## Embuilder
62+
63+
If your build process needs a separate step to build the port before linking,
64+
use Emscripten's `embuilder`.
65+
66+
Under `embuilder`, some options cannot be set automatically, so they must be
67+
set manually. See `OPTIONS` in `emdawnwebgpu.port.py` for details.
68+
"""
69+
70+
TAG = 'v20250531.224602'
871

972
EXTERNAL_PORT = f'https://github.com/google/dawn/releases/download/{TAG}/emdawnwebgpu_pkg-{TAG}.zip'
10-
SHA512 = '994eac4be5f69d8ec83838af9c7b4cc87f15fa22bede589517c169320dd69ab5cf164528f7bd6ec6503b1ef178da3d87df0565d16445dac2a69f98450083dd8f'
73+
SHA512 = 'e3db5b2a4cc97cbb9b8a0c1f6fe7a740bf644322dfa4641a7b0902c192c58205d76acb9b359a0d6da1fdc9795e85eb1cf1927aa47f2a82814ee29868fef6670e'
1174
PORT_FILE = 'emdawnwebgpu_pkg/emdawnwebgpu.port.py'
1275

1376
# Port information (required)
1477
URL = 'https://dawn.googlesource.com/dawn/+/refs/heads/main/src/emdawnwebgpu/'
15-
DESCRIPTION = "Emdawnwebgpu is a fork of Emscripten's original USE_WEBGPU, implementing a newer, more stable version of the standardized webgpu.h interface. If you find issues, verify in the latest nightly release (https://github.com/google/dawn/releases) and file feedback with Dawn. (Emdawnwebgpu is maintained as part of Dawn, the open-source WebGPU implementation used by Chromium, but it is still cross-browser.)"
78+
DESCRIPTION = "Emdawnwebgpu is a fork of Emscripten's original USE_WEBGPU, implementing a newer, more stable version of the standardized webgpu.h interface."
1679
LICENSE = "Some files: BSD 3-Clause License. Other files: Emscripten's license (available under both MIT License and University of Illinois/NCSA Open Source License)"

0 commit comments

Comments
 (0)