4 ms·
I think string builtins seem to be the direction the wasm committee is moving towards anyways? Unless I'm mistaken
by csjh 3y ago
I think string builtins seem to be the direction the wasm committee is moving towards anyways? Unless I'm mistaken
- davexunit 3y agoYeah, the JS String Builtins proposal is an alternative to stringref. Having experienced some of both, I think that stringref is much better.
- csjh 3y agoYeah, builtins seem like a bit of a specialized case. If I'm not mistaken, it doesn't even really give a Wasm-side method to create strings? Bit of a shame.
- davexunit 3y agoRight, inside the wasm module you're on your own and you use (array i8). Alternatively, you could decide that your strings are the host's strings and use (ref extern), but performance within the wasm module suffers because every string operation is a host call. The least worst option right now is (array i8) internally and copying whenever they cross the guest/host boundary.