Crates.io | bwasm |
lib.rs | bwasm |
version | 0.1.1 |
source | src |
created_at | 2019-11-27 00:59:18.953377 |
updated_at | 2019-12-27 13:00:45.005317 |
description | Loader for wasm binaries |
homepage | https://github.com/benediktwerner/bwasm |
repository | https://github.com/benediktwerner/bwasm.git |
max_upload_size | |
id | 184646 |
size | 31,513 |
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.
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);
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.
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.