Skip to content

Commit 72bcff5

Browse files
committed
Deprecate -sUSE_WEBGPU in favor of Dawn's emdawnwebgpu
Adds a linker warning for using -sUSE_WEBGPU, and update documentation. Emscripten's implementation of webgpu.h is unmaintained. We want people to move to Dawn's emdawnwebgpu implementation (fork). However, the API has changed substantially, so this not a clean transition. Plus, there might be new bugs in that implementation. So we need a decently long deprecation period before removing the old implementation. Issue: 23432
1 parent 002c63a commit 72bcff5

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,13 @@ Default value: false
880880
USE_WEBGPU
881881
==========
882882

883-
Enables support for WebGPU (via "webgpu/webgpu.h").
883+
Enables the built-in implementation of ``<webgpu/webgpu.h>``.
884+
Deprecated: Please try migrating to "emdawnwebgpu", a fork maintained by Dawn
885+
(but still cross-browser) that implements a newer, more stable version of
886+
the standardized interface, and file feedback (see its package README).
887+
https://github.com/google/dawn/releases
888+
889+
.. note:: This setting is deprecated
884890

885891
Default value: false
886892

src/settings.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,14 @@ var GL_FFP_ONLY = false;
572572
// [link]
573573
var GL_PREINITIALIZED_CONTEXT = false;
574574

575-
// Enables support for WebGPU (via "webgpu/webgpu.h").
575+
// Enables the built-in implementation of ``<webgpu/webgpu.h>``.
576+
// Deprecated: Please try migrating to ``--use-port=contrib.emdawnwebgpu``
577+
// which uses a fork maintained by Dawn (but still cross-browser) that
578+
// implements a newer, more stable version of the standardized interface. If
579+
// you find issues, verify it in the latest nightly release
580+
// (https://github.com/google/dawn/releases) and file feedback with Dawn.
576581
// [link]
582+
// [deprecated]
577583
var USE_WEBGPU = false;
578584

579585
// Enables building of stb-image, a tiny public-domain library for decoding

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10259,6 +10259,7 @@ def test_closure_webgpu(self):
1025910259
self.build('hello_world.c', emcc_args=[
1026010260
'--closure=1',
1026110261
'-Werror=closure',
10262+
'-Wno-error=deprecated',
1026210263
'-sINCLUDE_FULL_LIBRARY',
1026310264
'-sUSE_WEBGPU',
1026410265
])

tools/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
126126
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
127127
'MAYBE_WASM2JS': 'lack of usage',
128+
'USE_WEBGPU': 'please try migrating to --use-port=contrib.emdawnwebgpu, which uses a fork maintained by Dawn (but still cross-browser) that implements a newer, more stable version of the standardized interface. If you find issues, verify it in the latest nightly release (https://github.com/google/dawn/releases) and file feedback with Dawn.',
128129
}
129130

130131
# Settings that don't need to be externalized when serializing to json because they

0 commit comments

Comments
 (0)