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
{{ message }}
This repository has been archived by the owner on May 11, 2020. It is now read-only.
I'm not sure I understand the question. If you mean how can you call into Go code from a wasm module, please have a look at TestHostCall in exec/call_test.go - this describes how you can add in a native function to a wasm.Module so you can call it from wasm code.
Basically, you manipulate the fields of wasm.Module to add in whatever functions or tables you like.
@twitchyliquid64 .
i write code by rust and then converto to wasm.
I want to set a global object in wagon , and access it in rust. how to write the code
I think you can only pass 64bit arguments between function invocations. Anything else will need to be passed as a pointer/index and then use linear memory / tables.
For instance, you could write your rust code to save an object in linear memory 0x0000 - 0x2000, then use vm.Memory() to read that section of memory.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
how can i set a struct as ExternalGlobal like global in js
The text was updated successfully, but these errors were encountered: