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-oand 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):
wasm-interp(1)wasm-objdump(1)wasm-stats(1)wasm-strip(1)wasm-validate(1)wasm2c(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.
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
- 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