WABT(1)
π WABT(1) β wasm-stats, bestie edition π
okay so real quick, this whole page lives in the General Commands Manual for WABT, and today's main character is wasm-stats. she's the one we're talking about. let's go β¨
πΈ NAME πΈ
wasm-stats β show stats for a module. that's it, that's the job. she counts things so you don't have to π«Ά
π¦ SYNOPSIS π¦
wasm-stats [options] filename+
notice the filename+?? that plus is doing SO much work. you can hand her more than one file, bestie. she'll take them all, no cap π
β¨ DESCRIPTION β¨
wasm-stats reads a file in the wasm binary format and outputs stats. like, she looks at your module and goes "here's the tea, here's the numbers" ππ₯
The options are as follows:
--helpβ print this help message. the classic. the icon.--versionβ print version information. identity check πͺ-v,--verboseβ use multiple times for more info. yes, you can stack her. more-v= more yapping, and honestly we love that for us π¬--disable-exceptionsβ disable experimental exception handling--disable-mutable-globalsβ disable import/export mutable globals--disable-saturating-float-to-intβ disable saturating float-to-int operators--disable-sign-extensionβ disable sign-extension operators--disable-simdβ disable SIMD support--enable-threadsβ enable threading support π§΅--enable-function-referencesβ enable typed function references--disable-multi-valueβ disable multi-value--disable-tail-callβ disable tail-call support--disable-bulk-memoryβ disable bulk-memory operations--disable-reference-typesβ disable reference types (externref)--disable-annotationsβ disable custom annotation syntax--enable-code-metadataβ enable code metadata--enable-gcβ enable garbage collection ποΈβ¨--disable-memory64β disable 64-bit memory--disable-multi-memoryβ disable multi-memory--disable-extended-constβ disable extended constant expressions--disable-relaxed-simdβ disable relaxed SIMD--enable-custom-page-sizesβ enable custom page sizes--enable-compact-importsβ enable compact import section--enable-wide-arithmeticβ enable wide arithmetic--enable-allβ enable all features. the "just give me everything" option, the girl dinner of flags π½οΈπ-o,--output=FILENAMEβ output file for the stats, by default usestdout-c,--cutoff=Nβ cutoff for reporting counts less thanN. i.e. if a count is belowN, she's not reporting it. keep it cute, keep it filtered π
tiny note bestie: the disable ones start enabled-ish and the enable ones start off β that's literally what "enable"/"disable" means here, i'm not out here inventing lore π
π EXAMPLES π
parse binary file test.wasm and write opcode dist file test.dist:
$ wasm-stats test.wasm -o test.dist
see how easy that was?? one line, one dist file, main character energy fr fr π₯
π SEE ALSO π
the whole friend group, in order: wasm-interp(1), wasm-objdump(1), wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1), wat2wasm(1), spectest-interp(1) πΈπ«Ά
π BUGS π
if you find a bug, please report it at https://github.com/WebAssembly/wabt/issues. don't suffer in silence, that's not the vibe β tell the maintainers, they'll handle it πβ‘οΈπ§
and that's the page, bestie!! brought to you by the Debian packagers, dated $Mdocdate$, and filed under WABT(1) β go forth and stat your wasms π πβ¨
π¦ where this page comes from
- arch rolling: wabt 1.0.42-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms