mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 14:11:32 +00:00
Fixed example testing
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user