parity-wasm/README.md

30 lines
927 B
Markdown
Raw Normal View History

2017-04-04 16:06:58 +03:00
# parity-wasm
2017-04-04 16:15:05 +03:00
[![Build Status](https://travis-ci.org/NikVolf/parity-wasm.svg?branch=master)](https://travis-ci.org/NikVolf/parity-wasm)
2017-05-30 22:45:14 +04:00
[![crates.io link](https://img.shields.io/crates/v/parity-wasm.svg)](https://crates.io/crates/parity-wasm)
2017-04-04 16:15:05 +03:00
2017-04-04 16:43:30 +03:00
[Documentation](https://nikvolf.github.io/parity-wasm/parity_wasm/)
2017-04-04 16:08:20 +03:00
## Rust WebAssembly format serializing/deserializing
2017-04-04 16:06:58 +03:00
2017-05-23 17:37:57 +04:00
along with experimental interpreter
2017-04-04 16:06:58 +03:00
```rust
extern crate parity_wasm;
2017-06-03 23:45:42 +02:00
let module = parity_wasm::deserialize_file("./res/cases/v1/hello.wasm");
2017-04-04 16:06:58 +03:00
assert_eq!(module.code_section().is_some());
2017-04-04 16:07:55 +03:00
let code_section = module.code_section().unwrap(); // Part of the module with functions code
println!("Function count in wasm file: {}", code_section.bodies().len());
2017-04-04 16:06:58 +03:00
```
2017-04-04 16:48:01 +03:00
# License
`parity-wasm` is primarily distributed under the terms of both the MIT
license and the Apache License (Version 2.0), at your choice.
2017-05-23 17:37:57 +04:00
See LICENSE-APACHE, and LICENSE-MIT for details.