This PR scaffolds out support for preview 1 in wasi-common in terms of the preview 2 implementation.
The entire implementation itself is left as todo!(), but the skeleton is there: wiggle generates the preview 1 trait, and the implementation must be in terms of the wasmtime::component::bindgen! traits.
Runner and test suite are all added, so we can measure when the preview 1 support is "done" when it passes all tests, or at least fails the same trailing slash ones as its component based parent.
I had to rejigger the test suites as part of this PR:
we had a grab bag of behavioral tests in test-programs, those are now command-tests. host/tests/command.rs only tests those components now.
wasi-tests is still a crate, we can test both the modules and the components generated from it. host/tests/wasi_components.rs tests the components, host/tests/wasi_modules.rs tests the modules. Also, instead of using a custom expect_fail fn in here, I switched them to use #[should_panic]. All of wasi_modules.rs should panic at this time.
reactor-tests is the same
test-programs-macros has become test-programs. it now exports four different macros: command_tests_components, wasi_tests_modules, wasi_tests_components, and reactor_tests_components.
Based on #159 and #160
This PR scaffolds out support for preview 1 in wasi-common in terms of the preview 2 implementation.
The entire implementation itself is left as
todo!()
, but the skeleton is there: wiggle generates the preview 1 trait, and the implementation must be in terms of the wasmtime::component::bindgen! traits.Runner and test suite are all added, so we can measure when the preview 1 support is "done" when it passes all tests, or at least fails the same trailing slash ones as its component based parent.
I had to rejigger the test suites as part of this PR:
test-programs
, those are nowcommand-tests
.host/tests/command.rs
only tests those components now.wasi-tests
is still a crate, we can test both the modules and the components generated from it.host/tests/wasi_components.rs
tests the components,host/tests/wasi_modules.rs
tests the modules. Also, instead of using a customexpect_fail
fn in here, I switched them to use#[should_panic]
. All of wasi_modules.rs should panic at this time.reactor-tests
is the sametest-programs-macros
has becometest-programs
. it now exports four different macros:command_tests_components
,wasi_tests_modules
,wasi_tests_components
, andreactor_tests_components
.