WebAssembly / WebAssembly/threads
Potential web compatibility issue with exports of globals
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 767
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
From Globals.md, in the WebAssembly.Instance constructor
- if e is a global instance g with global_type gt:
- Return a new WebAssembly.Global with [[Global]] set to g and [[GlobalType]] set to gt.
Does this apply even for existing, immutable globals? It seems like if a website is using the global values with WebAssembly now, this would change how they would have to use it, resulting in a potential compatibility issue. Or am I understanding this wrong?
One workaround would be to expose constants as their value, and expose mutable globals as a WebAssembly.Global. This could still allow constant WebAssembly.Global objects to be constructed and used as imports.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the globals behavior described in Globals.md and the quoted WebAssembly.Instance constructor steps. Compare the treatment of existing immutable globals with current WebAssembly usage and assess the proposed distinction between constant values and mutable WebAssembly.Global objects. Done means reaching and documenting a clear compatibility decision; no test file is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100