Function instantiate_with_dummy

Source
pub fn instantiate_with_dummy(
    store: &mut Store<StoreLimits>,
    module: &Module,
) -> Option<Instance>
Expand description

Create a Wasmtime [Instance] from a [Module] and fill in all imports with dummy values (e.g., zeroed values, immediately-trapping functions). Also, this function catches certain fuzz-related instantiation failures and returns None instead of panicking.

TODO: we should implement tracing versions of these dummy imports that record a trace of the order that imported functions were called in and with what values. Like the results of exported functions, calls to imports should also yield the same values for each configuration, and we should assert that.