Skip to content

Support bundle and bundleAsync APIs in wasm builds#583

Merged
devongovett merged 4 commits intomasterfrom
wasm-bundle
Sep 11, 2023
Merged

Support bundle and bundleAsync APIs in wasm builds#583
devongovett merged 4 commits intomasterfrom
wasm-bundle

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
@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