Expand description
This module provide rust implementation for WASM module to talk with the outside according to version 1 of 3nweb’s message passing api (should be called abi?). This module provide rust implementation for WASM module to talk with the outside according to version 1 of 3nweb’s message passing api (should be called abi?).
Process of this message passing version is following.
-
To send messages outside, WASM uses imported
_3nweb_mp1_send_out_msg
during which call embeddder must read message from identified memory area. -
To send messages inside, embedder uses exported from WASM
_3nweb_mp1_accept_msg
. During this call, WASM calls back embedder’s imported_3nweb_mp1_write_msg_into
, where embedder actually copies data into provided memory area.
Functions§
- Sends given binary message to the outside.
- Sets a message
processor
function/closure that will be called with binary messages from the outside.