#testing #test-suite #latest #latest-version #wast #mirror

wasm-testsuite

Mirror of the WebAssembly core testsuite for use in testing WebAssembly implementations

4 releases

0.2.2 Mar 1, 2024
0.2.1 Jan 26, 2024
0.2.0 Dec 15, 2023
0.1.0 Dec 10, 2023

#1035 in WebAssembly

Download history 30/week @ 2024-07-28 10/week @ 2024-09-22 3/week @ 2024-09-29

99 downloads per month

Apache-2.0

12MB
183K SLoC

WebAssembly 183K SLoC // 0.0% comments Shell 146 SLoC // 0.1% comments Rust 67 SLoC

wasm-testsuite

This crate embeds the latest version of the WebAssembly Test Suite. It is currently mainly used for testing the tinywasm-parser crate. Check out the documentation for more information.

Usage

use wasm_testsuite::{MVP_TESTS, get_test_wast};

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_bytes).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.

Dependencies

~5–13MB
~143K SLoC