mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-27 15:41:33 +00:00
Update examples/plugin.rs
Co-Authored-By: MarkMcCaskey <MarkMcCaskey@users.noreply.github.com>
This commit is contained in:
@ -26,6 +26,7 @@ fn main() {
|
||||
|
||||
// get a reference to the function "plugin_entrypoint" which takes an i32 and returns an i32
|
||||
let entry_point = instance.func::<(i32), i32>("plugin_entrypoint").unwrap();
|
||||
// call the "entry_point" function in WebAssembly with the number "2" as the i32 argument
|
||||
let result = entry_point.call(2).expect("failed to execute plugin");
|
||||
println!("result: {}", result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user