LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

wat2wasm

Assemble WebAssembly text to binary

TLDR

Compile WAT to WASM
$ wat2wasm [input.wat]
copy
Output to file
$ wat2wasm [input.wat] -o [output.wasm]
copy
Validate only
$ wat2wasm --validate [input.wat]
copy
Verbose output
$ wat2wasm -v [input.wat]
copy
Debug names
$ wat2wasm --debug-names [input.wat]
copy

SYNOPSIS

wat2wasm [-o output] [-v] [options] input

DESCRIPTION

wat2wasm is an assembler from the WABT (WebAssembly Binary Toolkit) that compiles WebAssembly Text Format (WAT) files into binary WebAssembly (.wasm) modules. It is the counterpart to wasm2wat, which performs the reverse conversion.The tool validates the input WAT source against the WebAssembly specification during compilation, reporting syntax and type errors before producing output. A validate-only mode can check files without generating binary output, which is useful in build pipelines.The --debug-names option embeds function and variable names from the WAT source into the binary as custom sections, making the output easier to debug in browsers and other tools that display named symbols.

PARAMETERS

-o FILE

Output file.
-v
Verbose.
--validate
Validate only.
--debug-names
Include debug names.
--help
Show help.

INSTALL

sudo apt install wabt
copy
sudo dnf install wabt
copy
sudo pacman -S wabt
copy
brew install wabt
copy
nix profile install nixpkgs#wabt
copy

CAVEATS

WAT syntax required. Part of WABT. Strict validation.

HISTORY

wat2wasm is part of WABT (WebAssembly Binary Toolkit), compiling WAT text format to binary WASM.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid