OS Manuals

/usr/bin/wast2json

The WebAssembly Binary Toolkit

From wabt 1.0.42-r0 (os), captured 2026-11-05 by running wast2json --help (exit 0). permalink

usage: wast2json [options] filename

  read a file in the wasm spec test format, check it for errors, and
  convert it to a JSON file and associated wasm binary files.

examples:
  # parse spec-test.wast, and write files to spec-test.json. Modules are
  # written to spec-test.0.wasm, spec-test.1.wasm, etc.
  $ wast2json spec-test.wast -o spec-test.json

options:
      --help                                   Print this help message
      --version                                Print version information
  -v, --verbose                                Use multiple times for more info
      --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
  -o, --output=FILE                            output JSON file
  -r, --relocatable                            Create a relocatable wasm binary (suitable for linking with e.g. lld)
      --no-canonicalize-leb128s                Write all LEB128 sizes as 5-bytes instead of their minimal size
      --debug-names                            Write debug names to the generated binary file
      --no-check                               Don't check for invalid modules
Options (30)
OptionDescriptionSource
--helpPrint this help messagehelp + man
--versionPrint version informationhelp + man
-v, --verboseUse multiple times for more infohelp + man
--disable-exceptionsDisable Experimental exception handlinghelp + man
--disable-mutable-globalsDisable Import/export mutable globalshelp + man
--disable-saturating-float-to-intDisable Saturating float-to-int operatorshelp + man
--disable-sign-extensionDisable Sign-extension operatorshelp + man
--disable-simdDisable SIMD supporthelp + man
--enable-threadsEnable Threading supporthelp + man
--enable-function-referencesEnable Typed function referenceshelp + man
--disable-multi-valueDisable Multi-valuehelp + man
--disable-tail-callDisable Tail-call supporthelp + man
--disable-bulk-memoryDisable Bulk-memory operationshelp + man
--disable-reference-typesDisable Reference types (externref)help + man
--disable-annotationsDisable Custom annotation syntaxhelp + man
--enable-code-metadataEnable Code metadatahelp + man
--enable-gcEnable Garbage collectionhelp + man
--disable-memory64Disable 64-bit memoryhelp + man
--disable-multi-memoryDisable Multi-memoryhelp + man
--disable-extended-constDisable Extended constant expressionshelp + man
--disable-relaxed-simdDisable Relaxed SIMDhelp + man
--enable-custom-page-sizesEnable Custom page sizeshelp + man
--enable-compact-importsEnable Compact import sectionhelp + man
--enable-wide-arithmeticEnable Wide arithmetichelp + man
--enable-allEnable all featureshelp + man
-o, --output FILEoutput JSON filehelp + man
-r, --relocatableCreate a relocatable wasm binary (suitable for linking with e.g. lld)help + man
--no-canonicalize-leb128sWrite all LEB128 sizes as 5-bytes instead of their minimal sizehelp + man
--debug-namesWrite debug names to the generated binary filehelp + man
--no-checkDon't check for invalid moduleshelp
Examples (1) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.