wasmer/examples/no_abi_simple_plugin.rs

12 lines
168 B
Rust
Raw Normal View History

2019-07-01 18:17:31 +00:00
extern "C" {
fn it_works() -> i32;
}
#[no_mangle]
pub fn plugin_entrypoint(n: i32) -> i32 {
let result = unsafe { it_works() };
result + n
}
fn main() {}