watson
a hyper minimalistic no_std
+ alloc
web assembly parser for Rust based off the official specification
- single file ~1500 lines of code (mostly enums)
- supports all section types
- helper functions for finding things
[dependencies]
watson = "0.2"
Usage
use watson::*;
let program = Program.parse(&bytes_of_wasm)?;
for s in program.sections.iter() {
match s {
CodeSection(code)=> ...,
...
}
}
...
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in watson
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.