OS Manuals

/usr/bin/wasm-emscripten-finalize

Optimizer and compiler/toolchain library for WebAssembly

From binaryen 133-r0 (os), captured 2026-11-05 by running wasm-emscripten-finalize --help (exit 0). permalink

================================================================================
wasm-emscripten-finalize INFILE

Performs Emscripten-specific transforms on .wasm files
================================================================================


wasm-emscripten-finalize options:
---------------------------------

  --output,-o                          Output file

  --debuginfo,-g                       Emit names section in wasm binary (or
                                       full debuginfo in wast)

  --dwarf                              Update DWARF debug info

  --emit-text,-S                       Emit text instead of binary for the
                                       output file. In this mode if no output
                                       file is specified, we write to stdout.

  --side-module                        Input is an emscripten side module

  --input-source-map,-ism              Consume source map from the specified
                                       file

  --bigint,-bi                         Assume JS will use wasm/JS BigInt
                                       integration, so wasm i64s will turn into
                                       JS BigInts, and there is no need for any
                                       legalization at all (not even minimal
                                       legalization of dynCalls)

  --output-source-map,-osm             Emit source map to the specified file

  --output-source-map-url,-osu         Emit specified string as source map URL

  --check-stack-overflow               Check for stack overflows every time the
                                       stack is extended

  --standalone-wasm                    Emit a wasm file that does not depend on
                                       JS, as much as possible, using wasi and
                                       other standard conventions etc. where
                                       possible

  --minimize-wasm-changes              Modify the wasm as little as possible.
                                       This is useful during development as we
                                       reduce the number of changes to the wasm,
                                       as it lets emscripten control how much
                                       modifications to do.

  --no-dyncalls

  --dyncalls-i64


Tool options:
-------------

  --mvp-features,-mvp                  Disable all non-MVP features

  --all-features,-all                  Enable all features

  --detect-features                    (deprecated - this flag does nothing)

  --quiet,-q                           Emit less verbose output and hide trivial
                                       warnings.

  --experimental-poppy                 Parse wast files as Poppy IR for testing
                                       purposes.

  --emit-module-names                  Emit module names, even if not emitting
                                       the rest of the names section.

  --enable-sign-ext                    Enable sign extension operations

  --disable-sign-ext                   Disable sign extension operations

  --enable-threads                     Enable atomic operations

  --disable-threads                    Disable atomic operations

  --enable-mutable-globals             Enable mutable globals

  --disable-mutable-globals            Disable mutable globals

  --enable-nontrapping-float-to-int    Enable nontrapping float-to-int
                                       operations

  --disable-nontrapping-float-to-int   Disable nontrapping float-to-int
                                       operations

  --enable-simd                        Enable SIMD operations and types

  --disable-simd                       Disable SIMD operations and types

  --enable-bulk-memory                 Enable bulk memory operations

  --disable-bulk-memory                Disable bulk memory operations

  --enable-bulk-memory-opt             Enable memory.copy and memory.fill

  --disable-bulk-memory-opt            Disable memory.copy and memory.fill

  --enable-call-indirect-overlong      Enable LEB encoding of call-indirect
                                       (Ignored for compatibility as it has no
                                       effect on Binaryen)

  --disable-call-indirect-overlong     Disable LEB encoding of call-indirect
                                       (Ignored for compatibility as it has no
                                       effect on Binaryen)

  --enable-exception-handling          Enable exception handling operations

  --disable-exception-handling         Disable exception handling operations

  --enable-tail-call                   Enable tail call operations

  --disable-tail-call                  Disable tail call operations

  --enable-reference-types             Enable reference types

  --disable-reference-types            Disable reference types

  --enable-multivalue                  Enable multivalue functions

  --disable-multivalue                 Disable multivalue functions

  --enable-gc                          Enable garbage collection

  --disable-gc                         Disable garbage collection

  --enable-memory64                    Enable memory64

  --disable-memory64                   Disable memory64

  --enable-relaxed-simd                Enable relaxed SIMD

  --disable-relaxed-simd               Disable relaxed SIMD

  --enable-extended-const              Enable extended const expressions

  --disable-extended-const             Disable extended const expressions

  --enable-strings                     Enable strings

  --disable-strings                    Disable strings

  --enable-multimemory                 Enable multimemory

  --disable-multimemory                Disable multimemory

  --enable-stack-switching             Enable stack switching

  --disable-stack-switching            Disable stack switching

  --enable-shared-everything           Enable shared-everything threads

  --disable-shared-everything          Disable shared-everything threads

  --enable-fp16                        Enable float 16 operations

  --disable-fp16                       Disable float 16 operations

  --enable-custom-descriptors          Enable custom descriptors (RTTs) and
                                       exact references

  --disable-custom-descriptors         Disable custom descriptors (RTTs) and
                                       exact references

  --enable-multibyte                   Enable multibyte array loads and stores

  --disable-multibyte                  Disable multibyte array loads and stores

  --enable-acquire-release-atomics     Enable acquire/release atomic memory
                                       operations

  --disable-acquire-release-atomics    Disable acquire/release atomic memory
                                       operations

  --enable-custom-page-sizes           Enable custom page sizes

  --disable-custom-page-sizes          Disable custom page sizes

  --enable-wide-arithmetic             Enable wide arithmetic

  --disable-wide-arithmetic            Disable wide arithmetic

  --enable-compact-imports             Enable compact import section

  --disable-compact-imports            Disable compact import section

  --enable-relaxed-atomics             Enable relaxed atomic memory operations

  --disable-relaxed-atomics            Disable relaxed atomic memory operations

  --enable-typed-function-references   Deprecated compatibility flag

  --disable-typed-function-references  Deprecated compatibility flag

  --no-validation,-n                   Disables validation, assumes inputs are
                                       correct

  --pass-arg,-pa                       An argument passed along to optimization
                                       passes being run. Must be in the form
                                       KEY@VALUE.  If KEY is the name of a pass
                                       then it applies to the closest instance
                                       of that pass before us. If KEY is not the
                                       name of a pass then it is a global option
                                       that applies to all pass instances that
                                       read it.

  --closed-world,-cw                   Assume code outside of the module does
                                       not inspect or interact with GC and
                                       function references, even if they are
                                       passed out. The outside may hold on to
                                       them and pass them back in, but not
                                       inspect their contents or call them.

  --preserve-type-order                Preserve the order of types from the
                                       input (useful for debugging and testing)

  --generate-stack-ir                  generate StackIR during writing

  --optimize-stack-ir                  optimize StackIR during writing

  --print-stack-ir                     print StackIR during writing


General options:
----------------

  --version                            Output version information and exit

  --help,-h                            Show this help message and exit

  --debug,-d                           Print debug information to stderr
Options (88)
OptionDescriptionSource
--output, -oOutput filehelp
--debuginfo, -gEmit names section in wasm binary (or full debuginfo in wast)help
--dwarfUpdate DWARF debug infohelp
--emit-text, -SEmit text instead of binary for the output file.help
--side-moduleInput is an emscripten side modulehelp
--input-source-map, -ismConsume source map from the specified filehelp
--bigint, -biAssume JS will use wasm/JS BigInt integration, so wasm i64s will turn into JS BigInts, and there is no need for any legalization at all (not even minimal legalization of dynCalls)help
--output-source-map, -osmEmit source map to the specified filehelp
--output-source-map-url, -osuEmit specified string as source map URLhelp
--check-stack-overflowCheck for stack overflows every time the stack is extendedhelp
--standalone-wasmEmit a wasm file that does not depend on JS, as much as possible, using wasi and other standard conventions etc.help
--minimize-wasm-changesModify the wasm as little as possible.help
--no-dyncallshelp
--dyncalls-i64help
--mvp-features, -mvpDisable all non-MVP featureshelp
--all-features, -allEnable all featureshelp
--detect-features(deprecated - this flag does nothing)help
--quiet, -qEmit less verbose output and hide trivial warnings.help
--experimental-poppyParse wast files as Poppy IR for testing purposes.help
--emit-module-namesEmit module names, even if not emitting the rest of the names section.help
--enable-sign-extEnable sign extension operationshelp
--disable-sign-extDisable sign extension operationshelp
--enable-threadsEnable atomic operationshelp
--disable-threadsDisable atomic operationshelp
--enable-mutable-globalsEnable mutable globalshelp
--disable-mutable-globalsDisable mutable globalshelp
--enable-nontrapping-float-to-intEnable nontrapping float-to-int operationshelp
--disable-nontrapping-float-to-intDisable nontrapping float-to-int operationshelp
--enable-simdEnable SIMD operations and typeshelp
--disable-simdDisable SIMD operations and typeshelp
--enable-bulk-memoryEnable bulk memory operationshelp
--disable-bulk-memoryDisable bulk memory operationshelp
--enable-bulk-memory-optEnable memory.copy and memory.fillhelp
--disable-bulk-memory-optDisable memory.copy and memory.fillhelp
--enable-call-indirect-overlongEnable LEB encoding of call-indirect (Ignored for compatibility as it has no effect on Binaryen)help
--disable-call-indirect-overlongDisable LEB encoding of call-indirect (Ignored for compatibility as it has no effect on Binaryen)help
--enable-exception-handlingEnable exception handling operationshelp
--disable-exception-handlingDisable exception handling operationshelp
--enable-tail-callEnable tail call operationshelp
--disable-tail-callDisable tail call operationshelp
--enable-reference-typesEnable reference typeshelp
--disable-reference-typesDisable reference typeshelp
--enable-multivalueEnable multivalue functionshelp
--disable-multivalueDisable multivalue functionshelp
--enable-gcEnable garbage collectionhelp
--disable-gcDisable garbage collectionhelp
--enable-memory64Enable memory64help
--disable-memory64Disable memory64help
--enable-relaxed-simdEnable relaxed SIMDhelp
--disable-relaxed-simdDisable relaxed SIMDhelp
--enable-extended-constEnable extended const expressionshelp
--disable-extended-constDisable extended const expressionshelp
--enable-stringsEnable stringshelp
--disable-stringsDisable stringshelp
--enable-multimemoryEnable multimemoryhelp
--disable-multimemoryDisable multimemoryhelp
--enable-stack-switchingEnable stack switchinghelp
--disable-stack-switchingDisable stack switchinghelp
--enable-shared-everythingEnable shared-everything threadshelp
--disable-shared-everythingDisable shared-everything threadshelp
--enable-fp16Enable float 16 operationshelp
--disable-fp16Disable float 16 operationshelp
--enable-custom-descriptorsEnable custom descriptors (RTTs) and exact referenceshelp
--disable-custom-descriptorsDisable custom descriptors (RTTs) and exact referenceshelp
--enable-multibyteEnable multibyte array loads and storeshelp
--disable-multibyteDisable multibyte array loads and storeshelp
--enable-acquire-release-atomicsEnable acquire/release atomic memory operationshelp
--disable-acquire-release-atomicsDisable acquire/release atomic memory operationshelp
--enable-custom-page-sizesEnable custom page sizeshelp
--disable-custom-page-sizesDisable custom page sizeshelp
--enable-wide-arithmeticEnable wide arithmetichelp
--disable-wide-arithmeticDisable wide arithmetichelp
--enable-compact-importsEnable compact import sectionhelp
--disable-compact-importsDisable compact import sectionhelp
--enable-relaxed-atomicsEnable relaxed atomic memory operationshelp
--disable-relaxed-atomicsDisable relaxed atomic memory operationshelp
--enable-typed-function-referencesDeprecated compatibility flaghelp
--disable-typed-function-referencesDeprecated compatibility flaghelp
--no-validation, -nDisables validation, assumes inputs are correcthelp
--pass-arg, -paAn argument passed along to optimization passes being run.help
--closed-world, -cwAssume code outside of the module does not inspect or interact with GC and function references, even if they are passed out.help
--preserve-type-orderPreserve the order of types from the input (useful for debugging and testing)help
--generate-stack-irgenerate StackIR during writinghelp
--optimize-stack-iroptimize StackIR during writinghelp
--print-stack-irprint StackIR during writinghelp
--versionOutput version information and exithelp
--help, -hShow this help message and exithelp
--debug, -dPrint debug information to stderrhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.