6 ms·
Yes, another valid case is passing heap-allocated pointers between WASM guest and host. I have an example here if anyone is interested: https://github.com/fatih
by fatihpense 3y ago
Yes, another valid case is passing heap-allocated pointers between WASM guest and host. I have an example here if anyone is interested: https://github.com/fatihpense/zig-wasm-string-and-struct https://github.com/fatihpense/zig-wasm-string-and-struct
As a newbie in low-level programming, being able to return "heap-allocated pointer" instead of "stack-allocated pointer to a struct in heap" was a challenge at first :) But I love how everything is explicit in Zig.