WASM-TOOLS(WIT-SMITH)

NAME
wasm-tools wit-smith - A WIT test case generator.

SYNOPSIS
wasm-tools wit-smith [OPTIONS] [INPUT]

DESCRIPTION
A WIT test case generator.

Given an arbitrary input seed, `wit-smith` generates a valid WIT package set encoded as a WebAssembly component. The input seed is interpreted as a series of predetermined choices through a decision tree. Given the same input seed, `wit-smith` will always generate the same output WebAssembly component; it is deterministic. This tool is suitable for taking fuzz-generated input to generate a wide array of WIT documents.

## Example

Generate a WIT document from 100 bytes of random data:

$ head -c 100 /dev/urandom | wasm-tools wit-smith -t

  Arguments:

    [INPUT]

    The arbitrary input seed.

    `stdin` is used if this argument is not supplied.

OPTIONS

-o, --output <OUTPUT>

    Where to place output.

    If not provided then stdout is used.

-t, --wat

    Output the text format of WebAssembly instead of the binary format

--max-packages <MAX_PACKAGES>

    [default: 10]

--max-type-size <MAX_TYPE_SIZE>

    [default: 100]

--max-interface-items <MAX_INTERFACE_ITEMS>

    [default: 10]

--max-world-items <MAX_WORLD_ITEMS>

    [default: 10]

--max-pkg-items <MAX_PKG_ITEMS>

    [default: 10]

--max-type-parts <MAX_TYPE_PARTS>

    [default: 10]

--max-files-per-package <MAX_FILES_PER_PACKAGE>

    [default: 10]

--max-resource-items <MAX_RESOURCE_ITEMS>

    [default: 10]

--arbitrary-config

    Indicates that "arbitrary configuration" should be used meaning that the input seed is first used to generate the configuration and then afterwards the rest of the seed is used to generate the document

-v, --verbose...

    Use verbose output (-v info, -vv debug, -vvv trace)

--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]

-h, --help

    Print help (see a summary with '-h')