add fuzzing instructions to README

This commit is contained in:
Pat Hickey
2017-09-07 13:06:50 -07:00
parent 15690273cb
commit 3679f64b08

View File

@ -23,12 +23,20 @@ println!("Function count in wasm file: {}", code_section.bodies().len());
## Wabt Test suite
Interpreter and decoder supports full wabt testsuite (https://github.com/WebAssembly/testsuite), To run testsuite:
Interpreter and decoder supports full wabt testsuite (https://github.com/WebAssembly/testsuite), To run testsuite:
- make sure you have all prerequisites to build `wabt` (since parity-wasm builds it internally using `cmake`, see https://github.com/WebAssembly/wabt)
- checkout with submodules (`git submodule update --init --recurive`)
- run `cargo test --release --manifest-path=spec/Cargo.toml`
Decoder can be fuzzed with `cargo-fuzz` using `wasm-opt` (https://githib.com/WebAssembly/binaryen):
- make sure you have all prerequisites to build `binaryen` and `cargo-fuzz` (`cmake` and a C++11 toolchain)
- checkout with submodules (`git submodule update --init --recursive`)
- install `cargo fuzz` subcommand with `cargo install cargo-fuzz`
- set rustup to use a nightly toolchain, because `cargo fuzz` uses a rust compiler plugin: `rustup override set nightly`
- run `cargo fuzz run deserialize`
# License
`parity-wasm` is primarily distributed under the terms of both the MIT