4 ms·
NB: there's no passing strings to/from the wasm vm.
by irq-1 5y ago
NB: there's no passing strings to/from the wasm vm.
- rad_gruchalski 5y agoBut byte arrays would work?
- Hywan 5y agoWebAssembly only supports i32, i64, f32, and f64 for the moment. So you need to allocate the string manually inside the Wasm memory, then pass the pointer of that string to the Wasm function. I will add an example to showcase that, many people are asking this :-).
- irq-1 5y agoThanks for your work on wasmer-go. Would it be possible to make go functions that wrap string passing, and add them to the go api? Is freeing the memory manually inside the wasm vm something that can be delegated to the vm?
- rad_gruchalski 5y agoThis would be awesome! Thank you.