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
Passing complex data to WebAssembly requires its allocation in VM’s memory. Then a pointer to that data is passed to the called function instead. The same holds for the reverse case: the VM returns a pointer, then we can pick the bytes from memory. That creates a necessity to convert complex types (string, byte) into integers (pointers) before a function could pass them to VM or read data from memory. This logic is very general and it is the same for many Rust applications. Our proposal is to bundle them together and provide as a dependency in an SDK. This will also simplify using the Fluence network for developers.
Proposition
Create the first version of Fluence SDK for Rust that consists of:
Allocate and deallocate methods for external memory management.
Methods for reading from and writing to raw memory for UTF strings.
All of this functions will be used frequently and must be well tested.
Motivation
Passing complex data to WebAssembly requires its allocation in VM’s memory. Then a pointer to that data is passed to the called function instead. The same holds for the reverse case: the VM returns a pointer, then we can pick the bytes from memory. That creates a necessity to convert complex types (string, byte) into integers (pointers) before a function could pass them to VM or read data from memory. This logic is very general and it is the same for many Rust applications. Our proposal is to bundle them together and provide as a dependency in an SDK. This will also simplify using the Fluence network for developers.
Proposition
Create the first version of Fluence SDK for Rust that consists of:
All of this functions will be used frequently and must be well tested.
Also, the SDK has to publish to crates.io.
This task is a continuation of (#163).
The text was updated successfully, but these errors were encountered: