100 releases (major breaking)

new 201.0.0 Feb 27, 2024
200.0.0 Feb 15, 2024
71.0.1 Feb 12, 2024
70.0.2 Jan 29, 2024
1.0.2 Oct 17, 2019

#12 in WebAssembly

Download history 129595/week @ 2023-11-07 130307/week @ 2023-11-14 128545/week @ 2023-11-21 129652/week @ 2023-11-28 127158/week @ 2023-12-05 126999/week @ 2023-12-12 98317/week @ 2023-12-19 58929/week @ 2023-12-26 112255/week @ 2024-01-02 127441/week @ 2024-01-09 150963/week @ 2024-01-16 124582/week @ 2024-01-23 140294/week @ 2024-01-30 126159/week @ 2024-02-06 119289/week @ 2024-02-13 113651/week @ 2024-02-20

523,286 downloads per month
Used in 458 crates (43 directly)

Apache-2.0 WITH LLVM-exception

22K SLoC


A Bytecode Alliance project

A Rust parser for the WebAssembly Text Format (WAT).

Crates.io version Download docs.rs docs


Add wast to your Cargo.toml

$ cargo add wast

The intent of this crate is to provide utilities, combinators, and built-in types to parse anything that looks like a WebAssembly s-expression.

  • Need to parse a *.wat file?
  • Need to parse a *.wast file?
  • Need to run test suite assertions from the official wasm test suite?
  • Want to write an extension to the WebAssembly text format?

If you'd like to do any of the above this crate might be right for you! You may also want to check out the wat crate which provides a much more stable interface if all you'd like to do is convert *.wat to *.wasm.

Cargo features

By default this crate enables and exports support necessary to parse *.wat and *.wast files, or in other words entire wasm modules. If you're using this crate, however, to parse simply an s-expression wasm-related format (like *.witx or *.wit perhaps) then you can disable the default set of features to only include a lexer, the parsing framework, and a few basic token-related parsers.

$ cargo add wast --no-default-features


This project is licensed under the Apache 2.0 license with the LLVM exception. See LICENSE for more details.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.