I found your repo in the Zig Discord while learning how to transfer strings from js to zig. Thanks for that btw. Your code really helped me.
While reading your code I think I might have found a bug?
|
const buf = this.api.wisp_alloc(this.heap, 4 * arr.length) |
|
const mem = new Uint32Array(this.api.memory.buffer, buf, arr.length) |
In allocStrings +1 is added to the lengths in order to account for the sentinel value, but is missing in newv32.
I found your repo in the Zig Discord while learning how to transfer strings from js to zig. Thanks for that btw. Your code really helped me.
While reading your code I think I might have found a bug?
wisp/web/wisp.js
Lines 105 to 106 in b12b8af
In
allocStrings+1 is added to the lengths in order to account for the sentinel value, but is missing innewv32.