WASM-TOOLS(1)
π WASM-TOOLS(1) β User Commands π
okay bestie, welcome to the wasm-tools manual page for the print subcommand π
this is section 1 (User Commands), and it's literally the glow-up guide for turning your WebAssembly binary into text π¦
β¨ NAME β¨
wasm-tools print β print the textual form of a WebAssembly binary π
πΈ SYNOPSIS πΈ
wasm-tools print [OPTIONS] [INPUT]
π DESCRIPTION π
Print the textual form of a WebAssembly binary. that's it, that's the whole vibe β¨
π«Ά Arguments π«Ά
[INPUT]β the input file to process, bestie.
if you don't hand it one, or if it's literally just -, then stdin gets read entirely and processed π no cap. and heads up: for most subcommands this input can be either a binary *.wasm file or a textual format *.wat file, so pick your fighter π
π OPTIONS π
--generate-dwarf <lines|full>β optionally generate DWARF debugging information from WebAssembly text files π§
so when the input to this command is a WebAssembly text file, like a *.wat, this option tells the text parser to insert DWARF debugging info that maps binary locations back to the original source locations in the input *.wat file. iconic. but also β this option has no effect if the INPUT argument is already a WebAssembly binary, or if the text format uses (module binary ...). so don't come for it, it's just not doing anything there π
-gβ shorthand for--generate-dwarf fullπ«-o,--output <OUTPUT>β where to place output.
if you don't provide this then stdout is used, periodt π
-v,--verbose...β use verbose output (-vinfo,-vvdebug,-vvvtrace). yes the ellipsis is real, stack 'em up β¨--color <COLOR>β configuration over whether terminal colors are used in output π¨
supports one of auto|never|always|always-ansi. the default is to detect what to do based on the terminal environment, for example by using isatty.
[default: auto]
-p,--print-offsetsβ whether or not to print binary offsets intermingled in the text format as comments, for debugging π--skeletonβ indicates that the "skeleton" of a module should be printed π¦΄
items such as function bodies, data segments, and element segments are replaced with ... instead of printing their actual contents. lowkey minimalism, we love her π
--name-unnamedβ ensure all wasm items have$-based names, even if they don't have an entry in thenamesection π·οΈ
this option, when enabled, will synthesize names for any item which doesn't previously have a name. giving unnamed items main character energy fr fr π
-f,--fold-instructionsβ print instructions in the folded format π--print-operand-stackβ print the contents of the operand stack within function bodies π--indent-text <INDENT_TEXT>β the string to use when indenting πΈ--indent <INDENT>β number of spaces used for indentation, has lower priority than--indent-textβ οΈ (so if you set both,--indent-textwins, iykyk)-h,--helpβ print help (see a summary with-h) π«Ά
π reminder bestie:-vstacks,--indent-textbeats--indent, and-gis just--generate-dwarf fullwearing a cute little nickname. no surprises, all facts π
and that's the whole page, you ate that π this was wasm-tools print, version 1.239.0+ds, dated August 2026 β mwah, go print something iconic πβ¨
π¦ where this page comes from
- ubuntu stonking: wasm-tools 1.239.0+ds-10 Β· Apache-2.0 OR Apache-2.0 WITH LLVM exception OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms