Skip to content

Are names and UTF-8 validation web-only? #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
littledan opened this issue Aug 24, 2017 · 2 comments
Closed

Are names and UTF-8 validation web-only? #550

littledan opened this issue Aug 24, 2017 · 2 comments

Comments

@littledan
Copy link
Collaborator

Right now, JS.md refers to Web.md to define names. That document just seems to say, decode the names as UTF-8 into UTF-16 and throw eagerly on any validation errors when validating the module as a whole. Is that right? A couple questions:

  • Is there a particular reason this is in Web.md and not JS.md, and says "on the Web"? It's hard for me to understand which part of any of this would be skipped in other environments where WebAssembly is used. For example, wouldn't Node.js want to do all of the same things?
  • Does that conversion algorithm do anything additional besides throw on invalid UTF-8? Why not just say, "throw on invalid UTF-8"?
@lukewagner
Copy link
Member

The Web.md and JS.md bits you're referring to predate the more recent agreement and PR that all strings must be valid utf-8 in wasm. So we can probably nuke this "Names" section in Web.md and the JS-API spec can point to the core spec requirement.

Yeah, the conversion algorithm was I suppose just written that way to be concrete, I guess.

@littledan
Copy link
Collaborator Author

I see, seems to be pretty unambiguous from that PR. Thanks.

rossberg pushed a commit that referenced this issue Jul 17, 2024

Verified

This commit was signed with the committer’s verified signature.
jolheiser John Olheiser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants