-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add serdes API #69
Labels
help wanted
Extra attention is needed
Comments
2 tasks
I think the first option sounds better to me, simply because we won't need an additional layer for every single call. Having |
cjihrig
added a commit
that referenced
this issue
May 14, 2020
#94 has landed, but I'm leaving this open, as there are still a few things I'd like to address in the new serdes API:
|
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be useful if embedders didn't need to worry about serializing and deserializing between WASI data structures and the WASM memory. For example, Node.js currently does this:
The
wasi->write*()
calls could be replaced with auvwasi_serdes_write_fdstat_t(memory, stats, buf)
.Another option could be to provide wrappers for each function (
uvwasi_serdes_fd_fdstat_get()
, etc.). This would take care of bounds checking, reading from memory, executing the WASI API calls, writing back to memory, and forwarding the correct return value. This would be the simplest thing for embedders, but would also require a wrapper function for every WASI API call.Potentially useful reference: https://github.com/WebAssembly/tool-conventions/blob/master/BasicCABI.md
Any thoughts or opinions from others?
The text was updated successfully, but these errors were encountered: