-
Notifications
You must be signed in to change notification settings - Fork 33
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
Integration with import assertions #42
Comments
I think need should be no, but an implementation should feel free to add that. |
I guess there are two questions:
In HTML, implementations don't really have the freedom to add things--HTML is governed by a standard. We could make this mandatory, optional, or always missing, when used in HTML. But we won't let each individual browser choose its semantics. Other environments can sort of do whatever they want--they don't have to align with HTML, or they can align but also permit looser behavior. |
Do we envision the capabilities of Wasm and JS to diverge? If so, requiring an assertion might be prudent. |
When importing a Wasm module from JS, I don't think there's any reason to allow an import assertion, since the Wasm module can import other JS anyway. It remains possible to forbid that by using If we'd ever want to add a feature where JS imports Wasm that can't then import JS (though I don't see why we'd want to do that), we could use an import assertion for that - and it would be unfortunate if the obvious string was already taken here. Import assertions for wasm importing json (for example) are an orthogonal issue, which I believe needs some work still. |
Now that import assertions are Stage 3, we have to decide how they will integrate with Wasm/ESM integration. There are two aspects of this:
assert { type: "wasm" }
or is this OK to be implicit (given that, currently, JS and Wasm run at the same privilege level Should WebAssembly be at the same "privilege level" as JS? #41)?The text was updated successfully, but these errors were encountered: