Scroll to navigation

WASM-EMSCRIPTEN-FINALIZE(1) User Commands WASM-EMSCRIPTEN-FINALIZE(1)

NAME

wasm-emscripten-finalize - manual page for wasm-emscripten-finalize 122

DESCRIPTION

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

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

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

Output file
Emit names section in wasm binary (or full debuginfo in wast)
Update DWARF debug info
Emit text instead of binary for the output file. In this mode if no output file is specified, we write to stdout.
Input is an emscripten side module
Consume source map from the specified file
Do not fully legalize (i64->i32, f32->f64) the imports and exports for interfacing with JS
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)
Emit source map to the specified file
Emit specified string as source map URL
Check for stack overflows every time the stack is extended
Emit a wasm file that does not depend on JS, as much as possible, using wasi and other standard conventions etc. where possible
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: -------------

Disable all non-MVP features
Enable all features
(deprecated - this flag does nothing)
Emit less verbose output and hide trivial warnings.
Parse wast files as Poppy IR for testing purposes.
Enable sign extension operations
Disable sign extension operations
Enable atomic operations
Disable atomic operations
Enable mutable globals
Disable mutable globals
Enable nontrapping float-to-int operations
Disable nontrapping float-to-int operations
Enable SIMD operations and types
Disable SIMD operations and types
Enable bulk memory operations
Disable bulk memory operations
Enable memory.copy and memory.fill
Disable memory.copy and memory.fill
Enable LEB encoding of call-indirect (Ignored for compatibility as it has no effect on Binaryen)
Disable LEB encoding of call-indirect (Ignored for compatibility as it has no effect on Binaryen)
Enable exception handling operations
Disable exception handling operations
Enable tail call operations
Disable tail call operations
Enable reference types
Disable reference types
Enable multivalue functions
Disable multivalue functions
Enable garbage collection
Disable garbage collection
Enable memory64
Disable memory64
Enable relaxed SIMD
Disable relaxed SIMD
Enable extended const expressions
Disable extended const expressions
Enable strings
Disable strings
Enable multimemory
Disable multimemory
Enable stack switching
Disable stack switching
Enable shared-everything threads
Disable shared-everything threads
Enable float 16 operations
Disable float 16 operations
Deprecated compatibility flag
Deprecated compatibility flag
Disables validation, assumes inputs are correct
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.
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 the order of types from the input (useful for debugging and testing)
generate StackIR during writing
optimize StackIR during writing
print StackIR during writing

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

Output version information and exit
Show this help message and exit
Print debug information to stderr
February 2025 wasm-emscripten-finalize 122