Repository navigation
Tracking issue for the deprecation and removal of wasm2js (AKA WASM=0) #27608
Description
Activity
- 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 I confirmed that google internally no more users of emscripten's wasm2js feature.
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.High-Level Summary
- Raw GitHub counts:
"-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 outsideemscripten
tests)
- 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 0or--llvm-lto 1), or vendored copies of a few
upstream libraries (libwebp,draco,libsodium,xxHash,sql.js). - Note that
WebAssembly/binaryenalready dropped its-sWASM=0build in
Feb 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 repositories
on GitHub use-sWASM=2or-s WASM=2in.github/workflows. The only active
repositories referencing it are:openframeworks/apothecary(apothecary/apothecary,
modified Oct 2026):- Passes
export LINK_FLAGS="-s WASM=2 -pthread -matomics -mbulk-memory ..."
in its Emscripten dependency build script.
- Passes
OpenMPT/openmpt(build/make/config-emscripten.mk,
modified June 2026):- Supports
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.
- Supports
krkrsdl2/krkrsdl2(CMakeLists.txt, modified Sept 2025):- Has an off-by-default CMake option
KRKRSDL2_EMSCRIPTEN_ENABLE_JS_FALLBACK
that appends-sWASM=2.
- Has an off-by-default CMake option
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.
- Qt's Qbs build tool has blackbox tests verifying expected output file
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, using
Emscripten5.0.0):- Actively builds, tests (
npm run test-asm,test-asm-debug,
test-asm-memory-growth), and publishessql-asm.jsand
worker.sql-asm.jsrelease artifacts with-s WASM=0alongside its Wasm
builds.
- Actively builds, tests (
jedisct1/libsodium(14k stars,
dist-build/emscripten.sh, modified Sept 2026):- Always builds an
asm.jsfallback (emccLibsodium ... -Oz -s WASM=0) and
concatenates it as a backup module insidelibsodium.jsalongside the Wasm
build.
- Always builds an
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 checkunder Node (currently pinned to
emsdk3.1.33in CI).
- Has an active GitHub Actions CI step
Yahweasel/libav.js(530 stars,Makefile, modified Aug
2026):- Builds and ships
.asm.jsand.asm.mjsvariants (-s WASM=0) alongside
.wasm.jsand.wasm.mjsvariants for FFmpeg audio/video codecs.
- Builds and ships
justjake/quickjs-emscripten(1.7k stars,
scripts/prepareVariants.ts, modified Feb 2026):- Publishes
@jitl/quickjs-asmjs-mjs-release-syncusing-s WASM=0 -s SINGLE_FILE=1for constrained JS environments without WebAssembly, though
it currently pinsASMJS_EMSCRIPTEN_VERSION = "3.1.43"(while using
5.0.1for Wasm variants).
- Publishes
alpertron/calculators(254 stars,w.bat/Makefile,
modified Sept 2026):- Builds an asm.js fallback version with
-s WASM=0alongside its Wasm
builds.
- Builds an asm.js fallback version with
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=0for itsbrowser_jsMicroHs target (nix/mhs/default.nix,
Makefile.mhs) and insample-app/app.cabal/miso-lynx(targeting
ByteDance's Lynx mobile engine).
- React Native / Bundler single-file JS (
poe-platform/poe-code,
KittenML/KittenTTS-react-native):poe-platform/poe-code(packages/media-codecs/scripts/build.mjs,
modified Oct 2026): Uses Emscripten4.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=0so
React Native's Metro bundler can bundle the runtime as plain JS without
native/asset glue.
- PDF-embedded C/C++ apps (
ading2210/linuxpdf,EvanZhouDev/llm.pdf,
nikol4ss/doom-pdf):- Compile TinyEMU,
llama.cpp, and Doom withemcc -sWASM=0so they can
execute inside Chrome PDFium / Adobe Acrobat's embedded JS runtime, which
does not exposeWebAssembly.
- Compile TinyEMU,
C. Major Upstream Libraries with Optional / Legacy
-sWASM=0TargetsThese active projects still have
-sWASM=0in 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=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_js
SDL demo target with-sWASM=0(alongsidewebp_wasmwith-sWASM=1) when
WEBP_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_asmCMake
target with-s WASM=0alongsideminizinc_wasm.sciapp/gr(CMakeLists.txt): Sets-sWASM=0in itsEMSCRIPTEN
CMake block (also appears in Debian'sgr-frameworkpackage).
D. Build Tools & Toolchains
emscripten-core/emsdk:bazel/emscripten_toolchain/toolchain.bzlstill defines a
crosstool_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".
- Raw GitHub counts:
Emsdk PR: emscripten-core/emsdk#1806
Conan bug: conan-io/conan#20377
bx bug: bkaradzic/bx#446Hello, 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:- Keep binaryen’s standalone
wasm2jsmaintained, and document how to run an Emscripten-sWASM=1build’s output through it (e.g. a smallWebAssemblyshim that instantiates the wasm2js module). - Keep the wasm2js runtime piece of the JS glue as an opt-in library, even if
emccno longer drives it.
Our users have no WebAssembly by design, so they’re the audience this removal hits hardest.
- Keep binaryen’s standalone
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.
This would also include the removal of
-sWASM=2(which builds both JS and wasm versions of a program in a single command)>The process for deprecating and removing features from emscripten is laid out
in https://github.com/emscripten-core/emscripten/blob/main/CONTRIBUTING.md#deprecating-settings-and-features.
At any point in the process we may decide to delay or abort the deprecation and close this issue.
Deprecation checklist: