WASM-TOOLS(1)

πŸ“¦ version 1.239.0, in ubuntu stonking

πŸ’– 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 (-v info, -vv debug, -vvv trace). 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 the name section 🏷️

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-text wins, iykyk)
  • -h, --help β€” print help (see a summary with -h) 🫢

πŸ’– reminder bestie: -v stacks, --indent-text beats --indent, and -g is just --generate-dwarf full wearing 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