wasmer/examples/plugin-for-example/src/main.rs
2019-04-26 18:45:18 -07:00

13 lines
212 B
Rust

extern "C" {
fn it_works() -> i32;
}
#[no_mangle]
pub fn plugin_entrypoint(n: i32) -> i32 {
println!("Hello from inside WASI");
let result = unsafe { it_works() };
result + n
}
pub fn main() {}