2 releases

0.1.1 Dec 27, 2019
0.1.0 Nov 27, 2019

#1053 in WebAssembly

Download history 10/week @ 2024-02-19 12/week @ 2024-02-26 7/week @ 2024-03-04 4/week @ 2024-03-11 7/week @ 2024-03-18 13/week @ 2024-03-25 47/week @ 2024-04-01

73 downloads per month
Used in s1vm

MIT/Apache

20KB
508 lines

bwasm

This is basically just a thin wrapper around the parity-wasm WebAssembly parser that provides slightly higher-level information. It mainly combines all the information about functions into a single struct and combines imports and values defined in the module.

Documentation

Usage

Add to Cargo.toml

[dependencies]
bwasm = "0.1"

and then


let module = Module::from_file("some_file.wasm").unwrap();

let func = module.func(0);  // Get function with index 0 (panics if it doesn't exist)

println!("{}", func.name());
println!("{}", func.params().len());
println!("{}", func);

License

bwasm is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your choice.

See LICENSE-APACHE, and LICENSE-MIT for details.

Contribution

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

Dependencies

~380KB
~11K SLoC