Skip to content
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

Add async build support for the Web platform (asyncify) #100205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamscott
Copy link
Member

@adamscott adamscott commented Dec 9, 2024

Note

This PR is not needed per se now, but it will prove useful for integrating features that require deep asynchronicity when the codebase expects an immediate response. I think integrating WebGPU is such a case.

This PR adds asynchronous build support to the Web platform by introducing 2 build variables:

Build variable Description Default value Values
async Enable synchronous C++ interaction with asynchronous JavaScript. Produces bigger binaries. no no, yes
async_method Set the async method to use. Only applies if async=yes. asyncify asyncify, jspi

See Asynchronous Code from the emscripten docs for more details about async_method.

@adamscott adamscott added this to the 4.x milestone Dec 9, 2024
@adamscott adamscott requested a review from a team as a code owner December 9, 2024 14:50
@adamscott adamscott changed the title Add async build support for the Web platform Add async build support for the Web platform (asyncify) Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant