133 releases (37 breaking)

0.235.0 Jun 13, 2025
0.233.0 Jun 3, 2025
0.227.1 Mar 7, 2025
0.222.0 Dec 18, 2024
0.2.0 Nov 18, 2019

#24 in Parser implementations

Download history 98840/week @ 2025-03-01 100023/week @ 2025-03-08 122423/week @ 2025-03-15 88729/week @ 2025-03-22 97703/week @ 2025-03-29 108209/week @ 2025-04-05 75484/week @ 2025-04-12 88142/week @ 2025-04-19 72702/week @ 2025-04-26 84209/week @ 2025-05-03 75530/week @ 2025-05-10 93526/week @ 2025-05-17 87529/week @ 2025-05-24 99519/week @ 2025-05-31 91989/week @ 2025-06-07 104038/week @ 2025-06-14

396,493 downloads per month
Used in 322 crates (62 directly)

Apache-2.0…

1.5MB
33K SLoC

wasmprinter

A Bytecode Alliance project

A Rust parser for printing a WebAssembly binary in the WebAssembly Text Format (WAT).

Crates.io version Download docs.rs docs

Usage

Add wasmprinter to your Cargo.toml

$ cargo add wasmprinter

You can then convert wasm binaries to strings like so:

fn main() -> Result<()> {
    let foo_wat = wasmprinter::print_file("path/to/foo.wasm")?;

    let binary = /* ... */;
    let wat = wasmprinter::print_bytes(&binary)?;

    // ...
}

License

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

Contribution

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 licensed as above, without any additional terms or conditions.

Dependencies

~1–8MB
~57K SLoC