Update examples/plugin.rs

Co-Authored-By: MarkMcCaskey <MarkMcCaskey@users.noreply.github.com>
This commit is contained in:
Mackenzie Clark
2019-04-29 11:18:53 -07:00
committed by GitHub
parent bc0289cb84
commit 8e9767cf53

View File

@ -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);
}