Module component_types

Source
Expand description

This module generates test cases for the Wasmtime component model function APIs, e.g. wasmtime::component::func::Func and TypedFunc.

Each case includes a list of arbitrary interface types to use as parameters, plus another one to use as a result, and a component which exports a function and imports a function. The exported function forwards its parameters to the imported one and forwards the result back to the caller. This serves to exercise Wasmtime’s lifting and lowering code and verify the values remain intact during both processes.

Functions§

arbitrary_val
Generate an arbitrary instance of the specified type.
static_api_test
Generate zero or more sets of arbitrary argument and result values and execute the test using those values, asserting that they flow from host-to-guest and guest-to-host unchanged.