This commit updates the various tooling used by wasmtime which has new updates to the module linking proposal. This is done primarily to sync with WebAssembly/module-linking#26. The main change implemented here is that wasmtime now supports creating instances from a set of values, nott just from instantiating a module. Additionally subtyping handling of modules with respect to imports is now properly handled by desugaring two-level imports to imports of instances. A number of small refactorings are included here as well, but most of them are in accordance with the changes to `wasmparser` and the updated binary format for module linking.
15 lines
528 B
Rust
15 lines
528 B
Rust
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use std::time::Duration;
|
|
use wasm_smith::{Config, ConfiguredModule, SwarmConfig};
|
|
use wasmtime::Strategy;
|
|
use wasmtime_fuzzing::oracles;
|
|
|
|
fuzz_target!(|module: ConfiguredModule<SwarmConfig>| {
|
|
let mut cfg = wasmtime_fuzzing::fuzz_default_config(Strategy::Auto).unwrap();
|
|
cfg.wasm_multi_memory(true);
|
|
cfg.wasm_module_linking(module.config().module_linking_enabled());
|
|
oracles::instantiate_with_config(&module.to_bytes(), true, cfg, Some(Duration::from_secs(20)));
|
|
});
|