152 releases (51 breaking)

Uses new Rust 2024

new 0.249.0 May 15, 2026
0.247.0 Apr 17, 2026
0.246.1 Mar 31, 2026
0.243.0 Dec 3, 2025
0.2.0 Nov 18, 2019

#12 in WebAssembly

Download history 205436/week @ 2026-01-24 235494/week @ 2026-01-31 234420/week @ 2026-02-07 260693/week @ 2026-02-14 309134/week @ 2026-02-21 364984/week @ 2026-02-28 434962/week @ 2026-03-07 387243/week @ 2026-03-14 327557/week @ 2026-03-21 377089/week @ 2026-03-28 371666/week @ 2026-04-04 400767/week @ 2026-04-11 460443/week @ 2026-04-18 502337/week @ 2026-04-25 500786/week @ 2026-05-02 486770/week @ 2026-05-09

2,009,463 downloads per month
Used in 1,086 crates (78 directly)

Apache-2.0…

1.5MB
36K 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

~0.9–2.8MB
~49K SLoC