emscripten-core / emscripten-core/emscripten

How to load emscripten-generated.js files in webworker?

Open
#15,397 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

In webworker , we need load the .js file generated by emscripten , and call the wasm function in webworker.

we have a need that load the .js file when don't start a http server . i get we could use `-s SINGLE_FILE=1` Emscripten linker flag to bundle all the .js and .wasm to a single file, that will prevent the network request. But how can we load the .js file in webworker?

Another question is if we use `-s USE_PTHREADS=1` , can we bundle all the .js , .wasm and .worker.js to a single file, that will prevent the network request?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.