News for hackers. Stuff that matters.
Re:Making WebAssembly a first-class language on the Web by spankalee on Wednesday March 11, 2026 @04:49PM (#47341487)
My god yes.

I'm building a new Wasm GC-based language and I'm trying to make as small as binaries as possible to target use cases like a module-per-UI-component, and strings are the biggest hinderance to that. Both for the code size and the slow JS interop.

Re:Making WebAssembly a first-class language on the Web by davexunit on Wednesday March 11, 2026 @05:19PM (#47342089)
Yeah it's really frustrating and JS string builtins are not a good fit for me as I do not want to deal with 16-bit code units.
Re:Making WebAssembly a first-class language on the Web by dfabulich on Thursday March 12, 2026 @01:45AM (#47346954)
Who killed stringref and why?
Re:Making WebAssembly a first-class language on the Web by davexunit on Thursday March 12, 2026 @08:37AM (#47349743)
It couldn't get past a vote in the Wasm community group to advance from phase 1 to phase 2.

Here's a quote from the "requiem for stringref" article mentioned above:

> 1. WebAssembly is an instruction set, like AArch64 or x86. Strings are too high-level, and should be built on top, for example with (array i8).

> 2. The requirement to support fast WTF-16 code unit access will mean that we are effectively standardizing JavaScript strings.

Re:Making WebAssembly a first-class language on the Web by wffurr on Thursday March 12, 2026 @09:31AM (#47350288)
Can you use WTF-16 for strings in your language?
Re:Making WebAssembly a first-class language on the Web by spankalee on Thursday March 12, 2026 @04:07PM (#47356337)
I have a compiler flag to switch from wtf-8 and wtf-16 so if you compiler for your host you don't have to reencode strings. That means that strings in my language hide their byte representation, don't allow indexed access, and only have code point iterators.