You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
Rust has a string "hello". Rust calls hello_wasm() defined in wasm with the string as the input. hello_wasm() adds " yo wasm" to the string. Then wasm calls rust's function hello_host()with the modified string.hello_host()` appends " yo from host" to the string and returns it back to wasm. Wasm then appends, "wasm says yo again" to it, and returns it to the original rust code, which then prints it on console.
In the process all allocated memory should be cleanly cleaned as soon as we are done with the memory.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Rust has a string "hello". Rust calls
hello_wasm()
defined in wasm with the string as the input.hello_wasm()
adds" yo wasm" to the string. Then wasm calls rust's function
hello_host()with the modified string.
hello_host()` appends " yo from host" to the string and returns it back to wasm. Wasm then appends, "wasm says yo again" to it, and returns it to the original rust code, which then prints it on console.In the process all allocated memory should be cleanly cleaned as soon as we are done with the memory.
Beta Was this translation helpful? Give feedback.
All reactions