Sha256: 48d1c591f6cd903f0cff20adecfd73f1822b3e5102afa38945a7f4309f78bf41

Contents?: true

Size: 1.5 KB

Versions: 29

Compression:

Stored size: 1.5 KB

Contents

<div align="center">
  <h1><code>wasmprinter</code></h1>

<strong>A <a href="https://bytecodealliance.org/">Bytecode Alliance</a> project</strong>

  <p>
    <strong>A Rust parser for printing a WebAssembly binary in the <a href="https://webassembly.github.io/spec/core/text/index.html">WebAssembly Text Format (WAT)</a>.</strong>
  </p>

  <p>
    <a href="https://crates.io/crates/wasmprinter"><img src="https://img.shields.io/crates/v/wasmprinter.svg?style=flat-square" alt="Crates.io version" /></a>
    <a href="https://crates.io/crates/wasmprinter"><img src="https://img.shields.io/crates/d/wasmprinter.svg?style=flat-square" alt="Download" /></a>
    <a href="https://docs.rs/wasmprinter/"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
  </p>
</div>

## Usage

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 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](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.

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/wasmprinter-0.221.2/README.md
wasmtime-28.0.0 ./ext/cargo-vendor/wasmprinter-0.221.2/README.md
wasmtime-27.0.0 ./ext/cargo-vendor/wasmprinter-0.219.1/README.md
wasmtime-26.0.0 ./ext/cargo-vendor/wasmprinter-0.218.0/README.md
wasmtime-25.0.2 ./ext/cargo-vendor/wasmprinter-0.217.0/README.md
wasmtime-25.0.1 ./ext/cargo-vendor/wasmprinter-0.217.0/README.md
wasmtime-25.0.0 ./ext/cargo-vendor/wasmprinter-0.217.0/README.md
wasmtime-24.0.0 ./ext/cargo-vendor/wasmprinter-0.215.0/README.md
wasmtime-23.0.2 ./ext/cargo-vendor/wasmprinter-0.212.0/README.md
wasmtime-22.0.0 ./ext/cargo-vendor/wasmprinter-0.209.1/README.md
wasmtime-21.0.1 ./ext/cargo-vendor/wasmprinter-0.207.0/README.md
wasmtime-20.0.2 ./ext/cargo-vendor/wasmprinter-0.202.0/README.md
wasmtime-20.0.0 ./ext/cargo-vendor/wasmprinter-0.202.0/README.md
wasmtime-18.0.3 ./ext/cargo-vendor/wasmprinter-0.2.80/README.md
wasmtime-17.0.1 ./ext/cargo-vendor/wasmprinter-0.2.75/README.md
wasmtime-17.0.0 ./ext/cargo-vendor/wasmprinter-0.2.75/README.md
wasmtime-16.0.0 ./ext/cargo-vendor/wasmprinter-0.2.75/README.md
wasmtime-15.0.1 ./ext/cargo-vendor/wasmprinter-0.2.75/README.md
wasmtime-15.0.0 ./ext/cargo-vendor/wasmprinter-0.2.75/README.md
wasmtime-14.0.4 ./ext/cargo-vendor/wasmprinter-0.2.70/README.md