diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-01-26 19:14:54 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-01-26 19:14:54 +0100 |
| commit | 1f6ac248e106f77dee20af26567c61b2a35b75ba (patch) | |
| tree | b1bb054432d236311c50bce1f6be5b9c6bf1d754 /examples/rust/src/hello.rs | |
| parent | 8adce672578683dcc7ab62e5492e0f5dbc07a0b4 (diff) | |
fix: import param order
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'examples/rust/src/hello.rs')
| -rw-r--r-- | examples/rust/src/hello.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rust/src/hello.rs b/examples/rust/src/hello.rs index 6bb6d97..c8e2ac3 100644 --- a/examples/rust/src/hello.rs +++ b/examples/rust/src/hello.rs @@ -2,7 +2,7 @@ #[link(wasm_import_module = "env")] extern "C" { - fn print_utf8(location: i32, len: i32); + fn print_utf8(location: i64, len: i32); } const ARG: &[u8] = &[0u8; 100]; @@ -23,6 +23,6 @@ pub unsafe extern "C" fn hello(len: i32) { let res = format!("Hello, {}!", arg).as_bytes().to_vec(); let len = res.len() as i32; - let ptr = res.leak().as_ptr() as i32; + let ptr = res.leak().as_ptr() as i64; print_utf8(ptr, len); } |
