ceifa / wasmoon

A real lua 5.4 VM with JS bindings made with webassembly
MIT License
484 stars 32 forks source link

Pass strings including \0 through interop #121

Open basdl opened 2 months ago

basdl commented 2 months ago

Hi,

I am trying to pass \0 values through the interop layer e.g. I want to call a javascript method with an string argument. The string should act as a byte buffer (which perfectly works in Lua itself). However, when I pass it through the interop layer, the string is chopped at the first \0. Any sugesstions how to solve this? Javascript strings can also contain \0 in between.

Thanks

ceifa commented 1 week ago

Hey! Do you have a minimal repro for this?