diff options
Diffstat (limited to 'crates/wasm-testsuite/README.md')
| -rw-r--r-- | crates/wasm-testsuite/README.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/wasm-testsuite/README.md b/crates/wasm-testsuite/README.md new file mode 100644 index 0000000..c3dcde2 --- /dev/null +++ b/crates/wasm-testsuite/README.md @@ -0,0 +1,20 @@ +# `wasm-testsuite` + +This crate embeds the latest version of the [WebAssembly Test Suite](https://github.com/WebAssembly/spec/tree/main/test). It is currently mainly used for testing the `tinywasm-parser` crate. Check out the [documentation](https://docs.rs/wasm-testsuite) for more information. + +## Usage + +```rust +use wasm_testsuite::{MVP_TESTS, get_test_wast}; + +wasm_testsuite::MVP_TESTS.iter().for_each(|test| { + let wast_bytes = get_test_wast(test).expect("Failed to get wast bytes"); + let wast = std::str::from_utf8(&wast).expect("failed to convert wast to utf8"); + + // Do something with the wast (e.g. parse it using the `wast` crate) +}); +``` + +## License + +This crate is licensed under the [Apache License, Version 2.0](https://github.com/WebAssembly/spec/blob/main/test/LICENSE).
\ No newline at end of file |
