mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31:32 +00:00
Deprecate Instance::func
and Instance::dyn_func
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};
|
||||
use wasmer_runtime::{compile_with, compiler_for_backend, func, imports, Backend, Ctx, Func};
|
||||
use wasmer_runtime_core::{structures::TypedIndex, types::TableIndex};
|
||||
|
||||
static WASM: &'static str = "examples/callback-guest/callback-guest.wasm";
|
||||
@ -40,7 +40,7 @@ fn main() {
|
||||
.instantiate(&imports)
|
||||
.expect("failed to instantiate wasm module");
|
||||
|
||||
let entry_point = instance.func::<(u32, u32), u32>("main").unwrap();
|
||||
let entry_point: Func<(u32, u32), u32> = instance.exports.get("main").unwrap();
|
||||
|
||||
entry_point.call(0, 0).expect("START");
|
||||
}
|
||||
|
Reference in New Issue
Block a user