Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benediktwerner/bwasm
A slightly higher-level wasm parser built on top of parity-wasm
https://github.com/benediktwerner/bwasm
Last synced: about 7 hours ago
JSON representation
A slightly higher-level wasm parser built on top of parity-wasm
- Host: GitHub
- URL: https://github.com/benediktwerner/bwasm
- Owner: benediktwerner
- License: apache-2.0
- Created: 2019-11-24T20:24:26.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T19:46:03.000Z (about 2 years ago)
- Last Synced: 2024-10-28T17:27:12.818Z (20 days ago)
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bwasm
This is basically just a thin wrapper around the [parity-wasm](https://github.com/paritytech/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](https://docs.rs/bwasm)
## Usage
Add to Cargo.toml
```toml
[dependencies]
bwasm = "0.1"
```and then
```rust
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 bwasm by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.