Switch from hashmap_core to hashbrown.
As suggested [here](https://github.com/Amanieu/hashmap_core/pull/10#issuecomment-455866083). This also allows us to re-enable the basic compile fuzz target.
This commit is contained in:
@@ -10,7 +10,7 @@ extern crate wasmtime_jit;
|
||||
|
||||
use cranelift_codegen::settings;
|
||||
use wasmparser::validate;
|
||||
use wasmtime_environ::{Module, ModuleEnvironment};
|
||||
use wasmtime_jit::{CompiledModule, Compiler, NullResolver};
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if !validate(data, None) {
|
||||
@@ -21,14 +21,9 @@ fuzz_target!(|data: &[u8]| {
|
||||
panic!("host machine is not a supported target");
|
||||
});
|
||||
let isa = isa_builder.finish(settings::Flags::new(flag_builder));
|
||||
let mut module = Module::new();
|
||||
let environment = ModuleEnvironment::new(&*isa, &mut module);
|
||||
let translation = match environment.translate(data) {
|
||||
Ok(translation) => translation,
|
||||
Err(_) => return,
|
||||
};
|
||||
let imports_resolver = |_env: &str, _function: &str| None;
|
||||
let _exec = match wasmtime_jit::compile_and_link_module(&*isa, &translation, imports_resolver) {
|
||||
let mut compiler = Compiler::new(isa);
|
||||
let mut resolver = NullResolver {};
|
||||
let _compiled = match CompiledModule::new(&mut compiler, data, &mut resolver) {
|
||||
Ok(x) => x,
|
||||
Err(_) => return,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user