Skip to content

Wasm in Web Worker, ES Modules #3519

Closed Answered by daxpedda
tysen asked this question in Q&A
Discussion options

You must be logged in to vote

Answered on Discord:

You can use either.
After spawning the worker, you have to send over the module and use that to initialize the instance.
https://docs.rs/wasm-bindgen/0.2.87/src/wasm_bindgen/lib.rs.html#1355-1364
https://docs.rs/wasm-bindgen/0.2.87/wasm_bindgen/fn.memory.html

By calling initSync(module, memory)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by daxpedda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #3516 on July 14, 2023 17:58.