feat: add example4

This commit is contained in:
2023-01-18 23:46:14 +08:00
parent 1bc45c72b1
commit 8862192778
6 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#[link(wasm_import_module = "host")]
extern "C" {
#[link_name = "hello"]
fn host_hello(a: i32);
}
#[no_mangle]
pub extern "C" fn hello() {
unsafe { host_hello(3); }
}