-
Notifications
You must be signed in to change notification settings - Fork 281
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
Where to ask question about wasmi? #166
Comments
That's a great question! First, I'd recommend against using Basically you would need to write wrappers that use only ABI stable values and can be safely passed via ABI boundary. It is hard to recommend anything specific, but it looks like you deal with some JS input and JS output. So what you could do is some how allocate a buffer of memory in the wasm sandbox, then copy JS serialized memory into the allocated buffer and then call the entrypoint function with a pointer to the buffer. You might want to construct a slice from the input buffer. Then you do approximately the same, in the reverse direction when you are returning the data. The best option to reach us would be using Riot on Parity Wasm public channel. |
Thanks for response....
I wonder if anyone is working on a "conversion layer" to/from complex rust
types to wasm abi-safe types?
Kind of like what serde can do to derive serialize/deserialize to/from a
wire format, but to/from wasm ABI types?
It's kind of done by wasm-bindgen for JS no?
…On Tue, Jan 29, 2019, 11:05 Sergei Pepyakin ***@***.*** wrote:
Closed #166 <#166>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#166 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFReLK7L6a20t1pDOix65iCiVA75oyCIks5vIBzggaJpZM4aWk2d>
.
|
Something along the lines of this: http://timryan.org/2019/01/22/exporting-serde-types-to-typescript.html but instead of emitting a typescript type definition, it would generate the code to assemble the RuntimeValues to pass to the module_ref.invoke_export() method? |
Is there a better place then here, in issues, to ask questions about using wasmi?
In particular, I have functions like this:
written in rust, compiled to wasm, that I then want to call elsewhere (after loading the ModuleRef).
Is there any example code or hints on how to convert such complex input and output types to and from RuntimeValues, and call functions with that signature?
Thanks for any help here or pointers to where better to ask such question.
The text was updated successfully, but these errors were encountered: