WABT(1)

πŸ“¦
version 1.0.40 Β· 3 versions
, in debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… WABT(1) β€” the manual, bestie edition

okay so real talk, this page lives in the WABT(1) manual, and it's all about wasm-decompile, the little icon that takes your gnarly WebAssembly binary and hands you back something you can actually read. No cap.


✨ NAME ✨

wasm-decompile β€” translate from the binary format to readable C-like syntax πŸ¦‹


🌸 SYNOPSIS 🌸

wasm-decompile [options] file

πŸ’– DESCRIPTION πŸ’–

wasm-decompile reads a file in the WebAssembly binary format, and converts it to a decompiled text file. that's it, that's the whole glow-up ✨ binary in, C-like cuteness out.

the options are as follows, and yes we're going through all of them, no skipping, i don't play like that:

  • --help β€” prints a help message 🫢
  • --version β€” prints version information πŸ‘‘
  • -o, --output=FILENAME β€” where the decompiled file goes. by default it just uses stdout, so it'll spill right into your terminal πŸ’…
  • --enable-exceptions β€” enable 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
  • --enable-tail-call β€” enable Tail-call support
  • --disable-bulk-memory β€” disable Bulk-memory operations
  • --disable-reference-types β€” disable Reference types (externref)
  • --enable-annotations β€” enable Custom annotation syntax
  • --enable-code-metadata β€” enable Code metadata
  • --enable-gc β€” enable Garbage collection
  • --enable-memory64 β€” enable 64-bit memory
  • --enable-multi-memory β€” enable Multi-memory
  • --enable-extended-const β€” enable Extended constant expressions
  • --enable-all β€” enable all features πŸ”₯
  • --ignore-custom-section-errors β€” ignore errors in custom sections
heads up bestie, notice how some of these are --enable- and some are --disable-? that's not a typo, that's literally the flag names. copy them exactly or the whole vibe check fails πŸ’€

πŸŽ€ EXAMPLES πŸŽ€

parse the binary file test.wasm and write the text file test.dcmp:

$ wasm-decompile test.wasm -o test.dcmp

look at her go. iconic behaviour, honestly 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, all serving looks:


😭 BUGS 😭

if you find a bug, please report it at https://github.com/WebAssembly/wabt/issues β€” don't just suffer in silence, that's not the energy we're on 🫢


and that's the whole page, babe. this one ships from Debian, stamped with $Mdocdate$, and it's filed under WABT(1). go decompile something cute πŸ’œβœ¨