WASM-TOOLS(1)

πŸ“¦ version 1.239.0, in ubuntu stonking

πŸ’… WASM-TOOLS(1) β€” the wasm-tools wast page, bestie edition πŸ’…

okay so. this is the manual for wasm-tools wast, a subcommand that tests *.wast files β€” like, it checks them without actually running any WebAssembly code. it's giving quality-control energy and honestly? we're obsessed. 🫢


✨ NAME ✨

wasm-tools wast β€” a subcommand to test *.wast files short of executing WebAssembly code. no cap, that's literally the whole job. πŸ’–


🌸 SYNOPSIS 🌸

wasm-tools wast [OPTIONS] [INPUT]

πŸ¦‹ DESCRIPTION πŸ¦‹

A subcommand to test *.wast files short of executing WebAssembly code.

So here's the tea: this subcommand can be used to validate the *.wast test format used by the WebAssembly spec interpreter. It takes a single test case as input, and it will validate as much as it can about it, including:

  • The syntax of the test is valid. ⭐
  • Modules that are declared to be valid are indeed valid. βœ…
  • Modules that are declared to be invalid are indeed invalid. πŸ’€

This subcommand does not actually execute any WebAssembly code, so the *.wast test is not guaranteed to pass in a real runtime if passed to a runtime. It can be used as a quick check to double-check that a file is almost all valid, however. lowkey a vibe check, not a full audit, iykyk. πŸ™ˆ

The wasm-tools project itself also heavily relies on this subcommand for internal testing, so many tests for wasm-tools use this subcommand as a way to write tests. main character energy from a test tool, fr fr. πŸ‘‘

🌈 Arguments: 🌈

  • [INPUT] β€” Input file to process.

If not provided or if this is - then stdin is read entirely and processed. so like, pipe it in or pass the file, either one slays. πŸŽ€


🌟 OPTIONS 🌟

  • -v, --verbose... β€” Use verbose output (-v info, -vv debug, -vvv trace). the more v's, the more you know. πŸ”
  • --color <COLOR> β€” Configuration over whether terminal colors are used in output.

Supports one of auto|never|always|always-ansi. The default is to detect what to do based on the terminal environment, for example by using isatty.

[default: auto]

  • --ignore-error-messages β€” Whether to ignore the error message expectation in (assert_invalid ..) directives.

When enabled this will only assert that modules produce an error, not that the error produced by wasm-tools matches that written in the test itself. so you check that something went wrong, not that it went wrong the exact way the test said. πŸ’…

  • -f, --features <FEATURES> β€” Comma-separated list of WebAssembly features to enable during validation. πŸ‘‘

If a - character is present in front of a feature it will disable that feature. For example -simd will disable the simd proposal.

The placeholder all can be used to enable all wasm features and the term -all can be used to disable all features.

The default set of features enabled are all WebAssembly proposals that are at phase 4 or after. This means that the default set of features accepted are relatively bleeding edge. Versions of the WebAssembly specification can also be selected. The wasm1 or mvp feature can select the original WebAssembly specification and wasm2 can be used to select the 2.0 version.

Available feature options can be found in the wasmparser crate:

https://github.com/bytecodealliance/wasm-tools/blob/main/crates/wasmparser/src/features.rs
  • --allow-confusing-unicode β€” Whether or not "confusing unicode characters" are allowed to be present in *.wast files. 🧚

The default for this is false. so by default, no sneaky lookalike glyphs. 🚫

  • -a, --assert <ASSERT> β€” Perform extra internal assertions in wasm-tools itself over the provided test.

This is used within the testing of wasm-tools itself to perform more tests by default such as asserting that the text format round-trips where possible. Asserts can be listed here to perform extra checks when validating the *.wast input. ✨

[possible values: default, pretty-whitespace, snapshot-print, snapshot-json, snapshot-folded, test-folded, no-test-folded, permissive]

  • --snapshot <SNAPSHOT> β€” Directory to place snapshots in with --assert snapshot-* flags. πŸ“Έ
  • -h, --help β€” Print help (see a summary with -h). when you just need the tl;dr, bestie. πŸ’–

⚠️ reminder bestie: this whole thing validates *.wast files without executing WebAssembly code. passing here does not guarantee the test passes in a real runtime. don't come for me, it's literally in the description. 😭

and that's the whole page!! mwah. πŸ’‹ this one's for wasm-tools wast version 1.239.0+ds, dated August 2026, and yeah the manual's own name really is WASM-TOOLS(1) β€” she's serving User Commands realness and we love her for it. periodt. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from