wasmtime-dotnet icon indicating copy to clipboard operation
wasmtime-dotnet copied to clipboard

Optional String Encoding of Memory

Open Joshhua5 opened this issue 3 years ago • 1 comments

The memory layout of WASM strings compiled with AssemblyScript is in UTF16 format, while the memory.readstring functions are all hard coded to UTF8. https://github.com/AssemblyScript/assemblyscript/issues/1653

Providing an optional override for this format would be helpful, the temporary workaround is to encode strings within wasm, but ideally this could be avoided.

Joshhua5 avatar Jul 11 '22 06:07 Joshhua5

Hi @Joshhua5. I agree that it'd be best to have overloads to these methods that accept the encoding.

Would you like to contribute a patch for that? I would be happy to review it!

peterhuene avatar Jul 13 '22 17:07 peterhuene