25 releases

new 0.2.23 Feb 19, 2021
0.2.21 Jan 29, 2021
0.2.18 Dec 15, 2020
0.2.15 Nov 17, 2020
0.2.0 Nov 18, 2019
Download history 2211/week @ 2020-10-31 2340/week @ 2020-11-07 1719/week @ 2020-11-14 1451/week @ 2020-11-21 2397/week @ 2020-11-28 1168/week @ 2020-12-05 1816/week @ 2020-12-12 568/week @ 2020-12-19 368/week @ 2020-12-26 2133/week @ 2021-01-02 1845/week @ 2021-01-09 1479/week @ 2021-01-16 2244/week @ 2021-01-23 2348/week @ 2021-01-30 901/week @ 2021-02-06 1444/week @ 2021-02-13

6,728 downloads per month
Used in 6 crates (5 directly)

Apache-2.0 WITH LLVM-exception

515KB
11K 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

This crate is published on crates.io, so you can depend on it with:

[dependencies]
wasmprinter = "0.2.0"

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