Upgrade to wasmer 2.2 (#11168)

This commit is contained in:
Alexander Theißen
2022-04-05 19:01:45 +02:00
committed by GitHub
parent 7a4d5b5ec6
commit 14333e3074
6 changed files with 282 additions and 148 deletions
@@ -43,9 +43,8 @@ pub struct Backend {
impl Backend {
pub fn new() -> Self {
let compiler = wasmer_compiler_singlepass::Singlepass::default();
Backend { store: wasmer::Store::new(&wasmer::JIT::new(compiler).engine()) }
let compiler = wasmer::Singlepass::default();
Backend { store: wasmer::Store::new(&wasmer::Universal::new(compiler).engine()) }
}
}
@@ -191,6 +190,7 @@ pub fn instantiate(
wasmer::InstantiationError::Start(_) => InstantiationError::StartTrapped,
wasmer::InstantiationError::HostEnvInitialization(_) =>
InstantiationError::EnvironmentDefinitionCorrupted,
wasmer::InstantiationError::CpuFeature(_) => InstantiationError::CpuFeature,
})
})?;