#webassembly #parser #converter #printing #text #binary #format #tooling #low #level

wasmprinter

Rust converter from the WebAssembly binary format to the text format

10 releases

new 0.2.8 Jul 31, 2020
0.2.7 Jul 22, 2020
0.2.5 May 13, 2020
0.2.3 Feb 6, 2020
0.1.0 Nov 18, 2019

#271 in WebAssembly

Download history 2595/week @ 2020-04-16 2307/week @ 2020-04-23 1684/week @ 2020-04-30 1163/week @ 2020-05-07 2004/week @ 2020-05-14 1766/week @ 2020-05-21 2257/week @ 2020-05-28 1805/week @ 2020-06-04 1717/week @ 2020-06-11 1698/week @ 2020-06-18 2222/week @ 2020-06-25 1595/week @ 2020-07-02 1519/week @ 2020-07-09 1977/week @ 2020-07-16 1480/week @ 2020-07-23 1337/week @ 2020-07-30

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

Apache-2.0 WITH LLVM-exception

470KB
10K 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