To better support JavaScript host strings and source languages whose strings are 16-bit code units, we recently changed stringref to double down on WTF-8 / WTF-16. One repercussion was that string literals changed to be WTF-8 instead of UTF-8, to allow isolated surrogates. However, from
https://simonsapin.github.io/wtf-8/#intended-audience: "WTF-8 must not be used [...] for transmission over the Internet." (Tx @jakobkummerow for noticing).
So this issue is an open question whether it is OK to embed WTF-8 string literals in WebAssembly modules, or whether somehow having WTF-8 byte sequences in WebAssembly modules poses some larger problem for the ecosystem.
To better support JavaScript host strings and source languages whose strings are 16-bit code units, we recently changed
stringrefto double down on WTF-8 / WTF-16. One repercussion was that string literals changed to be WTF-8 instead of UTF-8, to allow isolated surrogates. However, fromhttps://simonsapin.github.io/wtf-8/#intended-audience: "WTF-8 must not be used [...] for transmission over the Internet." (Tx @jakobkummerow for noticing).
So this issue is an open question whether it is OK to embed WTF-8 string literals in WebAssembly modules, or whether somehow having WTF-8 byte sequences in WebAssembly modules poses some larger problem for the ecosystem.