Skip to content

Deprecate -sUSE_WEBGPU in favor of --use-port=emdawnwebgpu #24220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Apr 30, 2025

Add a linker warning for using -sUSE_WEBGPU pointing to --use-port=emdawnwebgpu, and update documentation.

Moves the port from contrib.emdawnwebgpu to just emdawnwebgpu since we'll keep maintaining it as we work on Emdawnwebgpu.

Emscripten's implementation of webgpu.h is unmaintained. Dawn now maintains "emdawnwebgpu", a fork of Emscripten's implementation that is up to date, resolving #23432.

We want people to move to emdawnwebgpu. However, the API has changed substantially, so it will take people time to switch over. Plus, there might be new bugs in that implementation. So we need a decently long deprecation period before removing the old implementation.

Closes #23432
Starts fixing #24265

@kainino0x kainino0x force-pushed the deprecate-use_webgpu branch from 7b73690 to 6eff958 Compare April 30, 2025 04:46
@xpenatan
Copy link
Contributor

xpenatan commented May 2, 2025

Hi, what about firefox or browsers that dont use dawn?

@kainino0x
Copy link
Collaborator Author

kainino0x commented May 2, 2025

emdawnwebgpu is independent of browser (except it supports a few experimental features that are only in Chromium browsers). They're actually just a fork of the bindings currently in Emscripten, the only difference is we're maintaining them in the Dawn repository instead of here.

I should clarify this in the deprecation message and/or in the emdawnwebgpu docs.

@kainino0x kainino0x force-pushed the deprecate-use_webgpu branch from 0eb1be6 to b23f8e8 Compare May 6, 2025 01:32
@kainino0x kainino0x marked this pull request as ready for review May 6, 2025 01:41
@kainino0x kainino0x requested a review from sbc100 May 6, 2025 01:42
@sbc100
Copy link
Collaborator

sbc100 commented May 6, 2025

I think we should maybe wait until we have a way for folks to do --use-port=contrib/emdawn.py (or something like that) to use the new version. i.e. lets fix #24260 first?

@ypujante
Copy link
Contributor

ypujante commented May 6, 2025

I think we should maybe wait until we have a way for folks to do --use-port=contrib/emdawn.py (or something like that) to use the new version. i.e. lets fix #24260 first?

I agree 100%. It would be better to deprecate -sUSE_WEBGPU while offering an alternative that is as painless as possible. And using the --user-port=contrib.emdawn syntax would be the least painless possible...

@kainino0x
Copy link
Collaborator Author

Seems reasonable.

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
@kainino0x kainino0x force-pushed the deprecate-use_webgpu branch from b23f8e8 to 72bcff5 Compare May 20, 2025 20:24
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a ChangeLog entry?

@kainino0x kainino0x marked this pull request as ready for review May 20, 2025 23:01
@kainino0x kainino0x changed the title Deprecate -sUSE_WEBGPU in favor of Dawn's emdawnwebgpu Deprecate -sUSE_WEBGPU in favor of --use-port=emdawnwebgpu May 20, 2025
@kainino0x kainino0x requested a review from sbc100 May 21, 2025 00:16
@kainino0x kainino0x force-pushed the deprecate-use_webgpu branch from be8431a to 35d443b Compare May 21, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emscripten's webgpu.h is behind the standard and Dawn implementations
4 participants