sync test: show the dummy executor will trap (rather than panic) when a future inside it pends. async test: show that the executor is hooked up to a future that pends for a trivial amount of time. this adds tokio to the dev-dependencies of wiggle, it shouldn't end up increasing the build burden for the project as a whole since its already a dev-dependency.
wiggle
Wiggle is a code generator for the host side of a witx interface. It is
invoked as a Rust procedural macro.
Wiggle is not specialized to any particular WebAssembly runtime. It is usable in at least Wasmtime and Lucet.
Learning more
Read the docs on docs.rs.
There are child crates for integrating with Wasmtime and Lucet.
The wasi-common crate is implemented using Wiggle and the wasmtime-wasi crate integrates wasi-common with the Wasmtime engine.
Andrew Brown wrote a great blog post on using Wiggle with Wasmtime.