WABT(1)

Okay bestie, welcome to the WABT(1) manual page! This is all about wasm2wat and it's gonna be a journey πŸ’–

✨ NAME ✨

wasm2wat β€” translate from the binary format to the text format πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

wasm2wat [options] filename

🌸 DESCRIPTION 🌸

So here's the vibe: wasm2wat reads a file in the WebAssembly binary format and converts it to the WebAssembly text format. That's literally the whole thing. No cap πŸ’―

The options are as follows (and yes, there are a lot of them, but I got you):

  • --help β€” Print this help message (like, it's just showing you the help text, very demure ✨)
  • --version β€” Print version information (so you know what you're working with, iykyk)
  • -v, --verbose β€” Use multiple times for more info (the more you use it, the more it spills the tea πŸ’…)
  • -o, --output=FILENAME β€” Output file for the generated wast file, by default use stdout (so if you want it in a file you say -o and give it a name; otherwise it just prints to your terminal like a little stream 🌊)
  • -f, --fold-exprs β€” Write folded expressions where possible (it's giving compact vibes ✨)
  • --disable-exceptions β€” Disable Experimental exception handling (no exceptions, literally)
  • --disable-mutable-globals β€” Disable Import/export mutable globals (mutable globals? not today πŸ’…)
  • --disable-saturating-float-to-int β€” Disable Saturating float-to-int operators (those operators? cancelled)
  • --disable-sign-extension β€” Disable Sign-extension operators (no sign extension, periodt)
  • --disable-simd β€” Disable SIMD support (SIMD? not on my watch)
  • --enable-threads β€” Enable Threading support (threads are threading 🧡)
  • --enable-function-references β€” Enable Typed function references (typed function references, very fancy)
  • --disable-multi-value β€” Disable Multi-value (multi-value? more like multi-nah)
  • --disable-tail-call β€” Disable Tail-call support (tail-call but make it disabled)
  • --disable-bulk-memory β€” Disable Bulk-memory operations (bulk memory? not today)
  • --disable-reference-types β€” Disable Reference types (externref) (no externref for you)
  • --disable-annotations β€” Disable Custom annotation syntax (annotations? cancelled)
  • --enable-code-metadata β€” Enable Code metadata (metadata about code, very meta)
  • --enable-gc β€” Enable Garbage collection (GC said: let me in πŸ’€)
  • --disable-memory64 β€” Disable 64-bit memory (64-bit memory? we're not doing that)
  • --disable-multi-memory β€” Disable Multi-memory (multi-memory? multi-no)
  • --disable-extended-const β€” Disable Extended constant expressions (extended const? extended no)
  • --disable-relaxed-simd β€” Disable Relaxed SIMD (relaxed SIMD? more like relaxed no)
  • --enable-custom-page-sizes β€” Enable Custom page sizes (custom page sizes, very bespoke ✨)
  • --enable-compact-imports β€” Enable Compact import section (compact imports, it's giving minimalism)
  • --enable-wide-arithmetic β€” Enable Wide arithmetic (wide arithmetic, thicc numbers)
  • --enable-all β€” Enable all features (just turn everything on, go off king πŸ‘‘)
  • --inline-exports β€” Write all exports inline (exports inline, very efficient)
  • --inline-imports β€” Write all imports inline (imports inline, also efficient)
  • --no-debug-names β€” Ignore debug names in the binary file (debug names? we don't know her)
  • --ignore-custom-section-errors β€” Ignore errors in custom sections (errors? what errors? we ignore them πŸ’…)
  • --generate-names β€” Give auto-generated names to non-named functions, types, etc. (auto-generated names for the unnamed, very generous)

πŸŽ€ EXAMPLES πŸŽ€

Okay so here's how you actually use this thing. First up: parse binary file test.wasm and write text file test.wast:

$ wasm2wat test.wasm -o test.wat

Second example: parse test.wasm, write test.wat, but ignore the debug names, if any:

$ wasm2wat test.wasm --no-debug-names -o test.wat

🌈 SEE ALSO 🌈

If you want more Unix content, check out these other manual pages (they're all linked, bestie):

πŸ’€ BUGS πŸ’€

If you find a bug, please report it at https://github.com/WebAssembly/wabt/issues.

Like, if something's not slaying the way it should, let them know. They'll fix it. Probably. πŸ™ˆ


And that's the tea, bestie! This manual page is brought to you by Debian, dated $Mdocdate$, and it's the WABT(1) manual. Stay iconic, stay wasm-ing πŸ’–βœ¨

πŸ“¦ where this page comes from