You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking issue for the deprecation and removal of wasm2js (AKA WASM=0)Â #27608
changed the title [-]Tracking issue for the deprecation and removal of wasm2js (-sWASM=0)[/-][+]Tracking issue for the deprecation and removal of wasm2js (`WASM=0`)[/+]on Aug 25, 2026
changed the title [-]Tracking issue for the deprecation and removal of wasm2js (`WASM=0`)[/-][+]Tracking issue for the deprecation and removal of wasm2js (AKA `WASM=0`)[/+]on Aug 25, 2026
AI generated report on current usage on the public internet:
Ran global searches across GitHub Code Search (including .github/workflows
and commit history since 2025), Sourcegraph (excluding forks and archived
repos), and Debian Code Search for -sWASM=0, -s WASM=0, -sWASM=2, -s WASM=2, and -sNO_WASM.
Most hits are inactive/noise: The vast majority of matches are old
generated Emscripten JS files ("Build with -s WASM=0 to target JavaScript instead"), commented-out template flags (e.g., raylib's # -sWASM=0),
unmaintained repos from the 2017–2020 era (often paired with removed flags
like --memory-init-file 0 or --llvm-lto 1), or vendored copies of a few
upstream libraries (libwebp, draco, libsodium, xxHash, sql.js).
Note that WebAssembly/binaryen already dropped its -sWASM=0 build in
Feb 2026 (#7995), and Rust removed the asmjs-unknown-emscripten target.
1. Active Users of -sWASM=2 / -s WASM=2
Usage of WASM=2 is nearly non-existent in active projects; 0 repositories
on GitHub use -sWASM=2 or -s WASM=2 in .github/workflows. The only active
repositories referencing it are:
Passes export LINK_FLAGS="-s WASM=2 -pthread -matomics -mbulk-memory ..."
in its Emscripten dependency build script.
OpenMPT/openmpt (build/make/config-emscripten.mk,
modified June 2026):
Supports EMSCRIPTEN_TARGET=all which sets LDFLAGS += -s WASM=2 -s LEGACY_VM_SUPPORT=1 (as well as EMSCRIPTEN_TARGET=js which sets -s WASM=0), though wasm (-s WASM=1) is also supported.
Has an off-by-default CMake option KRKRSDL2_EMSCRIPTEN_ENABLE_JS_FALLBACK
that appends -sWASM=2.
qbs/qbs (tests/auto/blackbox/tst_blackbox.cpp, modified Sept
2026; also in Debian Code Search):
Qt's Qbs build tool has blackbox tests verifying expected output file
suffixes (.js, .wasm, .wasm.js) when passing -sWASM=0, -sWASM=1,
and -sWASM=2.
2. Active Users of -sWASM=0 / -s WASM=0
A. Actively Building or Testing -sWASM=0 in CI / Default Releases
sql-js/sql.js (13.7k stars, Makefile & CI.yml, using
Emscripten 5.0.0):
Actively builds, tests (npm run test-asm, test-asm-debug, test-asm-memory-growth), and publishes sql-asm.js and worker.sql-asm.js release artifacts with -s WASM=0 alongside its Wasm
builds.
Always builds an asm.js fallback (emccLibsodium ... -Oz -s WASM=0) and
concatenates it as a backup module inside libsodium.js alongside the Wasm
build.
Cyan4973/xxHash (11.3k stars, .github/workflows/ci.yml,
modified Sept 2026; also in Debian Code Search):
Has an active GitHub Actions CI step Scalar asm.js (-sWASM=0) running LDFLAGS="-sWASM=0" make clean check under Node (currently pinned to emsdk3.1.33 in CI).
Publishes @jitl/quickjs-asmjs-mjs-release-sync using -s WASM=0 -s SINGLE_FILE=1 for constrained JS environments without WebAssembly, though
it currently pins ASMJS_EMSCRIPTEN_VERSION = "3.1.43" (while using 5.0.1 for Wasm variants).
Builds an asm.js fallback version with -s WASM=0 alongside its Wasm
builds.
B. Recent Projects Targeting Wasm-less JS Environments (2025–2026)
Haskell / MicroHs / Mobile JS runtimes (dmjio/miso, haskell-miso/miso-lynx):
dmjio/miso (2.4k stars, modified Oct 2026 in PR #1663): Uses emcc -sWASM=0 for its browser_js MicroHs target (nix/mhs/default.nix, Makefile.mhs) and in sample-app/app.cabal / miso-lynx (targeting
ByteDance's Lynx mobile engine).
poe-platform/poe-code (packages/media-codecs/scripts/build.mjs,
modified Oct 2026): Uses Emscripten 4.0.13 with -sWASM=0 -sWASM_ASYNC_COMPILATION=0 to bundle media codecs as pure JS.
KittenML/KittenTTS-react-native
(scripts/build-cephonemizer.js, modified May 2026): Uses -sWASM=0 so
React Native's Metro bundler can bundle the runtime as plain JS without
native/asset glue.
Compile TinyEMU, llama.cpp, and Doom with emcc -sWASM=0 so they can
execute inside Chrome PDFium / Adobe Acrobat's embedded JS runtime, which
does not expose WebAssembly.
C. Major Upstream Libraries with Optional / Legacy -sWASM=0 Targets
These active projects still have -sWASM=0 in their build scripts behind
non-default options (and are the source of most vendored hits in other repos
and Debian Code Search):
opencv/opencv (platforms/js/build_js.py): Passes -s WASM=0 only when --disable_wasm is explicitly passed on the CLI.
google/draco (cmake/draco_emscripten.cmake): Appends -sWASM=0 when the CMake option DRACO_WASM is OFF.
webmproject/libwebp (CMakeLists.txt): Defines a webp_js
SDL demo target with -sWASM=0 (alongside webp_wasm with -sWASM=1) when WEBP_BUILD_WEBP_JS is enabled and WEBP_ENABLE_SIMD is off.
rive-app/rive-runtime (build/setup_compiler.lua): Passes -sWASM=0 when configured with --emsdk=js instead of --emsdk=wasm.
ton-blockchain/ton (emulator/CMakeLists.txt): Appends -sWASM=0 only if USE_EMSCRIPTEN_NO_WASM is set.
MiniZinc/libminizinc
(cmake/support/config_emscripten.cmake): Defines a minizinc_asm CMake
target with -s WASM=0 alongside minizinc_wasm.
sciapp/gr (CMakeLists.txt): Sets -sWASM=0 in its EMSCRIPTEN
CMake block (also appears in Debian's gr-framework package).
Hello, apologies for the late comment, I’ve just seen this issue.
Use case not covered in the survey: Apple Lockdown Mode (iOS/iPadOS/macOS)
Lockdown Mode is Apple’s hardening setting for journalists, activists and others at risk of targeted spyware. In WebKit it disables the JIT and WebAssembly entirely: typeof WebAssembly === 'undefined' in Safari with Lockdown on (verified on iOS 26). The only way to run C/C++/Rust code for those users is plain JavaScript, i.e. wasm2js.
I’m building Lockdown-compatible media playback for a web subtitle editor. HEVC (hevc.js), VP9 (libvpx), AV1 (dav1d) and E-AC-3 (Rust, via binaryen’s wasm2js) all run as plain JS in Lockdown Mode at usable speed in the interpreter. For video codecs there’s no other route: Lockdown also disables WebCodecs video.
I understand the maintenance cost, and I’m not asking to keep -sWASM=0 itself. A supported migration path would be enough. Either of these would do:
Keep binaryen’s standalone wasm2js maintained, and document how to run an Emscripten -sWASM=1 build’s output through it (e.g. a small WebAssembly shim that instantiates the wasm2js module).
Keep the wasm2js runtime piece of the JS glue as an opt-in library, even if emcc no longer drives it.
Our users have no WebAssembly by design, so they’re the audience this removal hits hardest.
Oh no... that is indeed an annoying/worrying use case. I wonder if there are any plans to add a WebAssembly interpreter in that mode? I think this is what MS edge did for their locked down mode.
We do plan on keeping binaryen’s standalone wasm2js around yes. There are other users of that tool.
Funnily enough Safari does have a Wasm interpreter, and therefore can run Wasm in JIT-less mode.. but even that I guess they deem too dangerous for lock down mode.
I recommend you do not depreciate WASM=0 builds because:
WASM=0 builds can run locally without emrun you can just execute the html file and it run.
Isn't -sSINGLE_FILE enough to make this work?
PowerPC like Power9 for example, browsers do not support WASM execution. You lose support for all alternate platform.
But this doesn't really allow Power9 to use the open web in general, since many sites will be shipping Wasm-only. I guess it solves the problem if for a given app that knows it needs to target Power9? Is that your use case?
Activity
[-]Tracking issue for the deprecation and removal of wasm2js (-sWASM=0)[/-][+]Tracking issue for the deprecation and removal of wasm2js (`WASM=0`)[/+][-]Tracking issue for the deprecation and removal of wasm2js (`WASM=0`)[/-][+]Tracking issue for the deprecation and removal of wasm2js (AKA `WASM=0`)[/+]Mark wasm2js (WASM=0) as deprecated
Mark wasm2js (WASM=0) as deprecated
Mark wasm2js (WASM=0) as deprecated (#27655)
sbc100 commentedon Oct 6, 2026
I confirmed that google internally no more users of emscripten's wasm2js feature.
sbc100 commentedon Oct 6, 2026
AI generated report on current usage on the public internet:
Ran global searches across GitHub Code Search (including
.github/workflowsand commit history since 2025), Sourcegraph (excluding forks and archived
repos), and Debian Code Search for
-sWASM=0,-s WASM=0,-sWASM=2,-s WASM=2, and-sNO_WASM.High-Level Summary
"-sWASM=0": ~1,596 files |"-s WASM=0": ~5,528 files"-sWASM=2": ~92 files |"-s WASM=2": ~86 files"-sNO_WASM"/"-s NO_WASM": 8 files (none active outsideemscriptentests)
generated Emscripten JS files (
"Build with -s WASM=0 to target JavaScript instead"), commented-out template flags (e.g.,raylib's# -sWASM=0),unmaintained repos from the 2017–2020 era (often paired with removed flags
like
--memory-init-file 0or--llvm-lto 1), or vendored copies of a fewupstream libraries (
libwebp,draco,libsodium,xxHash,sql.js).WebAssembly/binaryenalready dropped its-sWASM=0build inFeb 2026 (
#7995), and Rust removed theasmjs-unknown-emscriptentarget.1. Active Users of
-sWASM=2/-s WASM=2Usage of
WASM=2is nearly non-existent in active projects; 0 repositorieson GitHub use
-sWASM=2or-s WASM=2in.github/workflows. The only activerepositories referencing it are:
openframeworks/apothecary(apothecary/apothecary,modified Oct 2026):
export LINK_FLAGS="-s WASM=2 -pthread -matomics -mbulk-memory ..."in its Emscripten dependency build script.
OpenMPT/openmpt(build/make/config-emscripten.mk,modified June 2026):
EMSCRIPTEN_TARGET=allwhich setsLDFLAGS += -s WASM=2 -s LEGACY_VM_SUPPORT=1(as well asEMSCRIPTEN_TARGET=jswhich sets-s WASM=0), thoughwasm(-s WASM=1) is also supported.krkrsdl2/krkrsdl2(CMakeLists.txt, modified Sept 2025):KRKRSDL2_EMSCRIPTEN_ENABLE_JS_FALLBACKthat appends
-sWASM=2.qbs/qbs(tests/auto/blackbox/tst_blackbox.cpp, modified Sept2026; also in Debian Code Search):
suffixes (
.js,.wasm,.wasm.js) when passing-sWASM=0,-sWASM=1,and
-sWASM=2.2. Active Users of
-sWASM=0/-s WASM=0A. Actively Building or Testing
-sWASM=0in CI / Default Releasessql-js/sql.js(13.7k stars,Makefile&CI.yml, usingEmscripten
5.0.0):npm run test-asm,test-asm-debug,test-asm-memory-growth), and publishessql-asm.jsandworker.sql-asm.jsrelease artifacts with-s WASM=0alongside its Wasmbuilds.
jedisct1/libsodium(14k stars,dist-build/emscripten.sh, modified Sept 2026):asm.jsfallback (emccLibsodium ... -Oz -s WASM=0) andconcatenates it as a backup module inside
libsodium.jsalongside the Wasmbuild.
Cyan4973/xxHash(11.3k stars,.github/workflows/ci.yml,modified Sept 2026; also in Debian Code Search):
Scalar asm.js (-sWASM=0)runningLDFLAGS="-sWASM=0" make clean checkunder Node (currently pinned toemsdk3.1.33in CI).Yahweasel/libav.js(530 stars,Makefile, modified Aug2026):
.asm.jsand.asm.mjsvariants (-s WASM=0) alongside.wasm.jsand.wasm.mjsvariants for FFmpeg audio/video codecs.justjake/quickjs-emscripten(1.7k stars,scripts/prepareVariants.ts, modified Feb 2026):@jitl/quickjs-asmjs-mjs-release-syncusing-s WASM=0 -s SINGLE_FILE=1for constrained JS environments without WebAssembly, thoughit currently pins
ASMJS_EMSCRIPTEN_VERSION = "3.1.43"(while using5.0.1for Wasm variants).alpertron/calculators(254 stars,w.bat/Makefile,modified Sept 2026):
-s WASM=0alongside its Wasmbuilds.
B. Recent Projects Targeting Wasm-less JS Environments (2025–2026)
dmjio/miso,haskell-miso/miso-lynx):dmjio/miso(2.4k stars, modified Oct 2026 in PR#1663): Usesemcc -sWASM=0for itsbrowser_jsMicroHs target (nix/mhs/default.nix,Makefile.mhs) and insample-app/app.cabal/miso-lynx(targetingByteDance's Lynx mobile engine).
poe-platform/poe-code,KittenML/KittenTTS-react-native):poe-platform/poe-code(packages/media-codecs/scripts/build.mjs,modified Oct 2026): Uses Emscripten
4.0.13with-sWASM=0 -sWASM_ASYNC_COMPILATION=0to bundle media codecs as pure JS.KittenML/KittenTTS-react-native(
scripts/build-cephonemizer.js, modified May 2026): Uses-sWASM=0soReact Native's Metro bundler can bundle the runtime as plain JS without
native/asset glue.
ading2210/linuxpdf,EvanZhouDev/llm.pdf,nikol4ss/doom-pdf):llama.cpp, and Doom withemcc -sWASM=0so they canexecute inside Chrome PDFium / Adobe Acrobat's embedded JS runtime, which
does not expose
WebAssembly.C. Major Upstream Libraries with Optional / Legacy
-sWASM=0TargetsThese active projects still have
-sWASM=0in their build scripts behindnon-default options (and are the source of most vendored hits in other repos
and Debian Code Search):
opencv/opencv(platforms/js/build_js.py): Passes-s WASM=0only when--disable_wasmis explicitly passed on the CLI.google/draco(cmake/draco_emscripten.cmake): Appends-sWASM=0when the CMake optionDRACO_WASMisOFF.webmproject/libwebp(CMakeLists.txt): Defines awebp_jsSDL demo target with
-sWASM=0(alongsidewebp_wasmwith-sWASM=1) whenWEBP_BUILD_WEBP_JSis enabled andWEBP_ENABLE_SIMDis off.rive-app/rive-runtime(build/setup_compiler.lua): Passes-sWASM=0when configured with--emsdk=jsinstead of--emsdk=wasm.ton-blockchain/ton(emulator/CMakeLists.txt): Appends-sWASM=0only ifUSE_EMSCRIPTEN_NO_WASMis set.MiniZinc/libminizinc(
cmake/support/config_emscripten.cmake): Defines aminizinc_asmCMaketarget with
-s WASM=0alongsideminizinc_wasm.sciapp/gr(CMakeLists.txt): Sets-sWASM=0in itsEMSCRIPTENCMake block (also appears in Debian's
gr-frameworkpackage).D. Build Tools & Toolchains
emscripten-core/emsdk:bazel/emscripten_toolchain/toolchain.bzlstill defines acrosstool_cpu_asmjsfeature that passesflags = ["-sWASM=0"].test/test.pyrunsdo_build(' -s WASM=0', is_expected=False).conan-io/conan(conan/tools/build/flags.py): Returns"-sWASM=0"whenarch == "asm.js"andcompiler == "emscripten".bkaradzic/bx(scripts/toolchain.lua, vendored intomame,crown, etc.): Defines anasmjstarget config with"-s WASM=0".sbc100 commentedon Oct 6, 2026
Emsdk PR: emscripten-core/emsdk#1806
Conan bug: conan-io/conan#20377
bx bug: bkaradzic/bx#446
[bazel] Remove asmjs / `-sWASM=0` support (#1806)
Remove support wasm2js (`WASM=0` and `WASM=2`)
Remove support for wasm2js (`WASM=0` and `WASM=2`)
cohunter commentedon Oct 9, 2026
Hello, apologies for the late comment, I’ve just seen this issue.
Use case not covered in the survey: Apple Lockdown Mode (iOS/iPadOS/macOS)
Lockdown Mode is Apple’s hardening setting for journalists, activists and others at risk of targeted spyware. In WebKit it disables the JIT and WebAssembly entirely:
typeof WebAssembly === 'undefined'in Safari with Lockdown on (verified on iOS 26). The only way to run C/C++/Rust code for those users is plain JavaScript, i.e. wasm2js.I’m building Lockdown-compatible media playback for a web subtitle editor. HEVC (hevc.js), VP9 (libvpx), AV1 (dav1d) and E-AC-3 (Rust, via binaryen’s
wasm2js) all run as plain JS in Lockdown Mode at usable speed in the interpreter. For video codecs there’s no other route: Lockdown also disables WebCodecs video.I understand the maintenance cost, and I’m not asking to keep
-sWASM=0itself. A supported migration path would be enough. Either of these would do:wasm2jsmaintained, and document how to run an Emscripten-sWASM=1build’s output through it (e.g. a smallWebAssemblyshim that instantiates the wasm2js module).emccno longer drives it.Our users have no WebAssembly by design, so they’re the audience this removal hits hardest.
sbc100 commentedon Oct 9, 2026
Oh no... that is indeed an annoying/worrying use case. I wonder if there are any plans to add a WebAssembly interpreter in that mode? I think this is what MS edge did for their locked down mode.
We do plan on keeping binaryen’s standalone
wasm2jsaround yes. There are other users of that tool.sbc100 commentedon Oct 12, 2026
Funnily enough Safari does have a Wasm interpreter, and therefore can run Wasm in JIT-less mode.. but even that I guess they deem too dangerous for lock down mode.
See https://discussions.apple.com/thread/255669636 .. no answer yet there.
sbc100 commentedon Oct 12, 2026
@cohunter, can you confirm that you are not using
-sWASM=2mode? At least perhaps we could remove that subset.cohunter commentedon Oct 13, 2026
Confirmed, standalone wasm2js is plenty, thank you. Switched to emcc -sWASM=1 + wasm2js with a small WebAssembly shim.
sbc100 commentedon Oct 13, 2026
Oh wow, thats great news. If it was easy to switch to standalone wasm2js then we can recommend that to others who want to use that method.
I think that layers of tools is much nicer in any case.
puckyoulol commentedon Oct 16, 2026
I recommend you do not depreciate WASM=0 builds because:
sbc100 commentedon Oct 16, 2026
Isn't
-sSINGLE_FILEenough to make this work?But this doesn't really allow Power9 to use the open web in general, since many sites will be shipping Wasm-only. I guess it solves the problem if for a given app that knows it needs to target Power9? Is that your use case?
puckyoulol commentedon Oct 16, 2026
Good point -sSINGLE_FILE with WASM=1 does also produce the same effect.
Yes I have a single friend who uses Power9 with Linux/Firefox who appreciates WASM=0 ðŸ˜
Why do you want to removed this feature btw? is it too much work to up-keep or?
sbc100 commentedon Oct 16, 2026
Yes, having to run the whole test sweet in
-sWASM=2and-sWASM=0modes is kind of costly, both in terms on CI time and maintenance cost.Also, it complicates the code base a fair bit.
Also, not all Wasm features are supported by wasm2js and that is only likely to increase over time.