summaryrefslogtreecommitdiff
path: root/crates/wasm-testsuite
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-12-12 09:14:26 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-12-12 09:14:26 +0100
commit1663131fb135abf96e4e68a5f872d5cb282ec5e5 (patch)
treea262d485b982531f2a64336039c880c69b0484d3 /crates/wasm-testsuite
parentcdf44f4852ed6f52deb9823331f26e0bbaf07732 (diff)
docs: update documentation
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/wasm-testsuite')
-rw-r--r--crates/wasm-testsuite/Cargo.toml3
-rw-r--r--crates/wasm-testsuite/README.md20
-rw-r--r--crates/wasm-testsuite/lib.rs7
3 files changed, 23 insertions, 7 deletions
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)]
#![doc(test(
no_crate_inject,