WASM-TOOLS(1)

πŸ“¦ version 1.239.0, in ubuntu stonking

✨ WASM-TOOLS(1) ✨ β€” the user commands era πŸ’…

okay bestie, we're diving into wasm-tools demangle, a lil' star in the wasm-tools family (that's the manual name, putting it right here up top so you're not lost 🫢). buckle up, this one's short but iconic.


πŸŽ€ NAME πŸŽ€

wasm-tools demangle β€” demangle Rust and C++ symbol names in the name section. yes, the whole job is un-mangling, and she does it flawlessly. ✨


🌸 SYNOPSIS 🌸

wasm-tools demangle [OPTIONS] [INPUT]

πŸ’– DESCRIPTION πŸ’–

okay so. this command detects a name section inside a wasm executable and then demangles any Rust and C++ symbol names it finds in there. that's it. that's the whole vibe. 😌

here's the part that actually matters tho: when tooling debugs a wasm module that uses the name section but doesn't run a demangler, it's gonna use the demangled names β€” because this command replaces the name section. so it's not just reading, it's rewriting. main character energy tbh πŸ‘‘

πŸ¦‹ Arguments: πŸ¦‹

  • [INPUT] β€” the input file you wanna process, bestie.

if you don't provide it, or if it's -, then stdin gets read entirely and processed. and ngl, for most subcommands this input can be either a binary *.wasm file or a textual format *.wat file. both are welcome here, we don't gatekeep πŸ’œ


✨ 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 *.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. cute, right? but heads up: this has no effect if the INPUT argument is already a WebAssembly binary, or if the text format uses (module binary ...). it just vibes and does nothing in those cases. πŸ™ˆ

  • -g β€” shorthand for --generate-dwarf full. one letter, same slay 🫢
  • -o, --output <OUTPUT> β€” where to place output. if you don't give one, stdout is used. simple as that πŸ’…
  • -v, --verbose... β€” use verbose output (-v info, -vv debug, -vvv trace). the more v's, the more you see. escalation nation πŸ”₯
  • --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. you know, the whole "is this even a real terminal" check.

[default: auto]

  • -t, --wat β€” output the text format of WebAssembly instead of the binary format. hex girl moment ✨
  • -h, --help β€” print help (see a summary with -h). the help for the help, we love a recursive icon πŸ’€

lowkey a warning but also just a fact: if you're feeding this a wasm binary and expecting --generate-dwarf to do something, it won't. and (module binary ...) text? also nope. don't come for me, come for the spec 🫢

and that's the whole page, bestie!! you ate. πŸ’–πŸŒΈπŸŽ€

this was wasm-tools demangle version 1.239.0+ds, dated August 2026 β€” shouting out the source and the date because they deserve their flowers too, periodt. πŸ‘‘πŸ¦‹βœ¨

πŸ“¦ where this page comes from