diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2025-02-12 19:13:23 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2025-02-12 19:13:23 +0100 |
| commit | d6493c277eb1104aaf72a8e0e6959ce3d1cc4932 (patch) | |
| tree | a82452aeb44be6b79d15fc83ddfcbd12a965520a /examples/rust/src/print.rs | |
| parent | 7e668f9e321c941f38395e47a29501dce0fc81a9 (diff) | |
fix: fix build, improve error handling
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'examples/rust/src/print.rs')
| -rw-r--r-- | examples/rust/src/print.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rust/src/print.rs b/examples/rust/src/print.rs index d04daa3..d2934f0 100644 --- a/examples/rust/src/print.rs +++ b/examples/rust/src/print.rs @@ -1,11 +1,11 @@ #![no_main] #[link(wasm_import_module = "env")] -extern "C" { +unsafe extern "C" { fn printi32(x: i32); } -#[no_mangle] +#[unsafe(no_mangle)] pub unsafe extern "C" fn add_and_print(lh: i32, rh: i32) { printi32(lh + rh); } |
