diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-12 09:14:26 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-12 09:14:26 +0100 |
| commit | 1663131fb135abf96e4e68a5f872d5cb282ec5e5 (patch) | |
| tree | a262d485b982531f2a64336039c880c69b0484d3 /crates | |
| parent | cdf44f4852ed6f52deb9823331f26e0bbaf07732 (diff) | |
docs: update documentation
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/types/README.md | 2 | ||||
| -rw-r--r-- | crates/wasm-testsuite/Cargo.toml | 3 | ||||
| -rw-r--r-- | crates/wasm-testsuite/README.md | 20 | ||||
| -rw-r--r-- | crates/wasm-testsuite/lib.rs | 7 |
4 files changed, 24 insertions, 8 deletions
diff --git a/crates/types/README.md b/crates/types/README.md index 0aecbcc..f2d048b 100644 --- a/crates/types/README.md +++ b/crates/types/README.md @@ -1,3 +1,3 @@ # `tinywasm_types` -This crate contains the types used by the [`tinywasm`](https://crates.io/crates/tinywasm) crate.
\ No newline at end of file +This crate contains the types used by the [`tinywasm`](https://crates.io/crates/tinywasm) crate. It is also used by the [`tinywasm_parser`](https://crates.io/crates/tinywasm_parser) crate to parse WebAssembly binaries. diff --git a/crates/wasm-testsuite/Cargo.toml b/crates/wasm-testsuite/Cargo.toml index 68f2355..30a4e58 100644 --- a/crates/wasm-testsuite/Cargo.toml +++ b/crates/wasm-testsuite/Cargo.toml @@ -2,8 +2,9 @@ name="wasm-testsuite" version="0.1.0" description="Mirror of the WebAssembly core testsuite for use in testing WebAssembly implementations" +license="Apache-2.0" +readme="README.md" edition.workspace=true -license.workspace=true authors.workspace=true repository.workspace=true 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 diff --git a/crates/wasm-testsuite/lib.rs b/crates/wasm-testsuite/lib.rs index 7e6afb4..9e38bfc 100644 --- a/crates/wasm-testsuite/lib.rs +++ b/crates/wasm-testsuite/lib.rs @@ -1,9 +1,4 @@ -//! This crate provides a way to access the WebAssembly spec testsuite. -//! -//! The testsuite is included as a git submodule and embedded into the binary. -//! -//! Generated from <https://github.com/WebAssembly/testsuite> - +#![doc = include_str!("README.md")] #![forbid(unsafe_code)] #