Skip to content

Commit c411764

Browse files
authored
Document -sWASM_WORKERS=2 build mode better. (#21614)
Document -sWASM_WORKERS=2 build mode better. It was previously documented directly in code in https://github.com/emscripten-core/emscripten/blob/8b180923ccc1f1e05688f76bd935675d7e7c8ff1/src/library_wasm_worker.js#L130-L134 , but was not that discoverable. Closes #21609.
1 parent 62d7153 commit c411764

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/settings.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,9 +1635,13 @@ var USE_SQLITE3 = false;
16351635
// [compile+link] - affects user code at compile and system libraries at link.
16361636
var SHARED_MEMORY = false;
16371637

1638-
// If true, enables support for Wasm Workers. Wasm Workers enable applications
1638+
// If 1, enables support for Wasm Workers. Wasm Workers enable applications
16391639
// to create threads using a lightweight web-specific API that builds on top
1640-
// of Wasm SharedArrayBuffer + Atomics API.
1640+
// of Wasm SharedArrayBuffer + Atomics API. When enabled, a new build output
1641+
// file a.ww.js will be generated to bootstrap the Wasm Worker JS contexts.
1642+
// If 2, enables support for Wasm Workers, but without using a separate a.ww.js
1643+
// file on the side. This can simplify deployment of builds, but will have a
1644+
// downside that the generated build will no longer be csp-eval compliant.
16411645
// [compile+link] - affects user code at compile and system libraries at link.
16421646
var WASM_WORKERS = 0;
16431647

0 commit comments

Comments
 (0)