Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluence Rust sdk - version 1 #267

Closed
RicoGit opened this issue Oct 31, 2018 · 1 comment
Closed

Fluence Rust sdk - version 1 #267

RicoGit opened this issue Oct 31, 2018 · 1 comment
Assignees
Labels
~virtual machine component: virtual machine

Comments

@RicoGit
Copy link
Contributor

RicoGit commented Oct 31, 2018

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:

  • 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.

Also, the SDK has to publish to crates.io.

This task is a continuation of (#163).

@RicoGit RicoGit added the ~virtual machine component: virtual machine label Oct 31, 2018
@RicoGit RicoGit self-assigned this Oct 31, 2018
@RicoGit RicoGit mentioned this issue Oct 31, 2018
@RicoGit
Copy link
Contributor Author

RicoGit commented Nov 7, 2018

done

@RicoGit RicoGit closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~virtual machine component: virtual machine
Projects
None yet
Development

No branches or pull requests

1 participant