WASM

Build License Crates.io Version Docs.rs Version

A Rust-native WebAssembly syntax model useful for generate, reading, and emitting WebAssembly code.

Design

WASM-AST is designed with minimal validation. The goal is to closely model the WASM syntax specification in order to allow valid and invalid abstract syntax trees.

Usage

To use wasm-ast, first add this to your Cargo.toml:

toml [dependencies] wasm-ast = "0.0.1"

Then, add this to your crate:

```rust use wasm_ast::model::Module;

fn main() { // ... } ```

Examples

Create an empty WASM module:

```rust use wasm_ast::model::Module;

fn main() { let builder = Module.builder(); let module = builder.build(); } ```

License

Licensed under Apache License, Version 2.0 (LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.