wasmprinter
A Rust parser for printing a WebAssembly binary in the WebAssembly Text Format (WAT).
Add wasmprinter
to your Cargo.toml
sh
$ cargo add wasmprinter
You can then convert wasm binaries to strings like so:
```rust fn main() -> Result<()> { let foowat = wasmprinter::printfile("path/to/foo.wasm")?;
let binary = /* ... */;
let wat = wasmprinter::print_bytes(&binary)?;
// ...
} ```
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 licensed as above, without any additional terms or conditions.