Fixed example testing

This commit is contained in:
Syrus
2020-04-15 19:34:25 -07:00
parent 21cef317b1
commit 8a669cfda5
4 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
/// This example demonstrates the use of callbacks: calling functions (Host and Wasm)
/// passed to us from the Wasm via hostcall
use wasmer_runtime::{compile_with, compiler_for_backend, func, imports, Backend, Ctx, Func};
use wasmer::{compiler::compile, func, imports, vm::Ctx, Func};
use wasmer_runtime_core::{structures::TypedIndex, types::TableIndex};
static WASM: &'static str = "examples/callback-guest/callback-guest.wasm";
@ -34,8 +34,7 @@ fn main() {
},
};
let compiler = compiler_for_backend(Backend::default()).unwrap();
let module = compile_with(&wasm_bytes[..], compiler.as_ref()).unwrap();
let module = compile(&wasm_bytes[..]).unwrap();
let instance = module
.instantiate(&imports)
.expect("failed to instantiate wasm module");