webassembly - passing string between zig and javascript

When working with webassembly (wasm) we only have numeric values. This means that if we need to handle strings, we need to handle them in raw binary data format using TypedArray & ArrayBuffer . If we want to pass complex data types between the web assembly (wasm) and the host JavaScript environment, we pass the memory pointer to shared memory and a length data. In this blog post we will learn how…