WASM-TOOLS(1)
β¨ 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 (-vinfo,-vvdebug,-vvvtrace). 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-dwarfto 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
- 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