Description
We already have code to create default values in order to implement https://docs.rs/wasmtime/latest/wasmtime/struct.Linker.html#method.define_unknown_imports_as_default_values
We have duplicates of that code in the fuzzing utility crate: https://github.com/bytecodealliance/wasmtime/blob/main/crates/fuzzing/src/oracles/dummy.rs
We should just expose those constructors in the public API of the wasmtime
crate, move the various fuzzing oracles over to these methods, and then delete 95% of that wasmtime_fuzzing::oracles::dummy
module.
I am thinking that we will want to expose these as pub fn default_value(&self, store: impl AsContextMut) -> Option<T>
methods on wasmtime::{ExternType,GlobalType,MemoryType,ValType,...}
where T
is wasmtime::Memory
for the wasmtime::MemoryType
method, etc...