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
(Opening a discussion because I think this isn't an issue with zware)
First, thank you for this library, it works great and the user-facing code is quite easy to grasp, even for a zig and wasm newcomer as myself.
I would like to get help on how to pass strings (and therefore, serialized advanced data-structure) back and forth between the host and the module.
I understand the only way is to put the string into the memory and pass addresses and offsets to tell the module where to find the string, but I can't seem to achieve it.
I tried with Instance.getMemory() and Memory.write() but the write function only handle numbers :(
I believe I should be able to write from zware into the DATA section and then... I'm not sure and I'm lost.
I admit, I'm a newcomer to both memory-managed languages AND to WASM.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
(Opening a discussion because I think this isn't an issue with zware)
First, thank you for this library, it works great and the user-facing code is quite easy to grasp, even for a zig and wasm newcomer as myself.
I would like to get help on how to pass strings (and therefore, serialized advanced data-structure) back and forth between the host and the module.
I understand the only way is to put the string into the memory and pass addresses and offsets to tell the module where to find the string, but I can't seem to achieve it.
I tried with
Instance.getMemory()
andMemory.write()
but thewrite
function only handle numbers :(I believe I should be able to write from zware into the
DATA
section and then... I'm not sure and I'm lost.I admit, I'm a newcomer to both memory-managed languages AND to WASM.
Beta Was this translation helpful? Give feedback.
All reactions