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

Support bundle and bundleAsync APIs in wasm builds #583

Merged
merged 4 commits into from
Sep 11, 2023
Merged

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Sep 11, 2023

Fixes #277

This uses Emscripten/Binaryen's Asyncify transform to allow synchronous WASM code to call asynchronous JavaScript code. That way a custom resolver can be passed in to read files. That avoids it needing to be multithreaded, which is complicated in WASM (without WASI). The node flavor has a default resolver that reads files using node's filesystem. The browser version will require a custom resolver to be passed in.

@devongovett devongovett merged commit 0db4fd3 into master Sep 11, 2023
3 checks passed
@devongovett devongovett deleted the wasm-bundle branch September 11, 2023 02:12
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.

How to use bundleAsync in Deno?
1 participant