| Crates.io | wasmfmt |
| lib.rs | wasmfmt |
| version | 0.2.4 |
| created_at | 2021-01-31 23:28:20.160534+00 |
| updated_at | 2022-08-22 11:53:26.49541+00 |
| description | A WebAssembly formatter |
| homepage | https://github.com/philipahlberg/wasmfmt |
| repository | https://github.com/philipahlberg/wasmfmt |
| max_upload_size | |
| id | 349046 |
| size | 155,943 |
A tool for formatting .wat code.
Available as a command-line tool and a library.
For more information on how to use the library, see the API docs.
To get wasmfmt, you have two options:
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:
wasmfmt fix /path/to/file.wat
To determine if a file is formatted properly, use wasmfmt check:
wasmfmt check /path/to/file.wat
To simply see the formatted version of a file, use wasmfmt print:
wasmfmt print /path/to/file.wat
For more information on how to use the tool, use wasmfmt help:
wasmfmt help
To build the binary, use Cargo:
cargo build --release
The generated binary is located in target/release/wasmfmt.
To run the tests, use Cargo:
cargo test
wasmfmt is distributed under the terms of the MIT license. See LICENSE for details.