2 <h1><code>wast</code></h1>
4 <strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>
7 <strong>A Rust parser for the <a href="https://webassembly.github.io/spec/core/text/index.html">WebAssembly Text Format (WAT)</a>.</strong>
11 <a href="https://crates.io/crates/wast"><img src="https://img.shields.io/crates/v/wast.svg?style=flat-square" alt="Crates.io version" /></a>
12 <a href="https://crates.io/crates/wast"><img src="https://img.shields.io/crates/d/wast.svg?style=flat-square" alt="Download" /></a>
13 <a href="https://docs.rs/wast/"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
20 Add `wast` to your `Cargo.toml`
26 The intent of this crate is to provide utilities, combinators, and built-in
27 types to parse anything that looks like a WebAssembly s-expression.
29 * Need to parse a `*.wat` file?
30 * Need to parse a `*.wast` file?
31 * Need to run test suite assertions from the official wasm test suite?
32 * Want to write an extension to the WebAssembly text format?
34 If you'd like to do any of the above this crate might be right for you! You may
35 also want to check out the `wat` crate which provides a much more stable
36 interface if all you'd like to do is convert `*.wat` to `*.wasm`.
40 By default this crate enables and exports support necessary to parse `*.wat` and
41 `*.wast` files, or in other words entire wasm modules. If you're using this
42 crate, however, to parse simply an s-expression wasm-related format (like
43 `*.witx` or `*.wit` perhaps) then you can disable the default set of features to
44 only include a lexer, the parsing framework, and a few basic token-related
48 $ cargo add wast --no-default-features
53 This project is licensed under the Apache 2.0 license with the LLVM exception.
54 See [LICENSE](LICENSE) for more details.
58 Unless you explicitly state otherwise, any contribution intentionally submitted
59 for inclusion in this project by you, as defined in the Apache-2.0 license,
60 shall be dual licensed as above, without any additional terms or conditions.