|0.2.4||Aug 22, 2022|
|0.2.3||Aug 19, 2022|
|0.2.2||Feb 10, 2021|
|0.1.1||Feb 2, 2021|
|0.1.0||Jan 31, 2021|
#490 in WebAssembly
A tool for formatting
Available as a command-line tool and a library.
For more information on how to use the library, see the API docs.
wasmfmt, you have two options:
- Download a prebuilt binary from the releases page. Binaries are distributed for the following platforms:
- Linux (x86_64 and ARM64, GNU and musl)
- MacOS (x86_64 and ARM64)
- Windows (x86_64 and ARM64)
- Build the tool manually, either from crates.io or directly from this repository.
To install from crates.io:
cargo install wasmfmt
To install from source:
cargo install --path /path/to/wasmfmt
To format a file in-place, use
wasmfmt fix /path/to/file.wat
To determine if a file is formatted properly, use
wasmfmt check /path/to/file.wat
To simply see the formatted version of a file, use
wasmfmt print /path/to/file.wat
For more information on how to use the tool, use
To build the binary, use Cargo:
cargo build --release
The generated binary is located in
To run the tests, use Cargo:
wasmfmt is distributed under the terms of the MIT license. See LICENSE for details.