Skip to content

FF153 source phase imports of wasm - #30136

Merged
Elchi3 merged 2 commits into
mdn:mainfrom
hamishwillee:ff153_source_imports_wasm
Aug 14, 2026
Merged

FF153 source phase imports of wasm#30136
Elchi3 merged 2 commits into
mdn:mainfrom
hamishwillee:ff153_source_imports_wasm

Conversation

@hamishwillee

Copy link
Copy Markdown
Contributor

In #30034 I added a subfeature for import source syntax. This syntax is designed to allow importing a module as source and then later compile it. There are separate proposals to allow importing of WASM modules and JavaScript modules.

The problem here is that you might reasonably assume seeing the current feature that you can import all module types. In fact you can import none by default. What this does is add a subfeature for WASM module import which is supported in FF on nightly AND behind a pref.
I'd have to add a record anyway when this ships.

The spec link here fails CI: https://webassembly.github.io/esm-integration/js-api/index.html#esm-integration

I wanted to check this is the right URL to use before we try get it into browser specs.
The relevant links are https://github.com/tc39/proposal-source-phase-imports , but the bit that will allow this to be used in JS is https://github.com/WebAssembly/esm-integration/tree/master/proposals/esm-integration. I think the link above is the most reasonable place since it it explicitly mentions both cases.

Related docs work can be tracked in mdn/content#44475

@github-actions github-actions Bot added data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed labels Jul 28, 2026
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@hamishwillee

Copy link
Copy Markdown
Contributor Author

@Elchi3 If you have a moment, would love your thoughts on the selected spec URL (see description).

@Elchi3 Elchi3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't really understand all the different WASM specs either. Wish they had a simpler structure. Best is to ask in browser-specs

@hamishwillee

Copy link
Copy Markdown
Contributor Author

Unfortunately I don't really understand all the different WASM specs either. Wish they had a simpler structure. Best is to ask in browser-specs

Thanks. Hoping to get an answer in w3c/browser-specs#2591

Comment thread javascript/statements.json Outdated
@hamishwillee
hamishwillee requested a review from Elchi3 August 14, 2026 04:43
@hamishwillee

Copy link
Copy Markdown
Contributor Author

@Elchi3 I found the spec link I am currently using has an alternative form, so I updated to that (might not be "the best spec link" but it isn't wrong). So I think this now good to go.

@Elchi3 Elchi3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah great! Thanks Hamish! 👍

@Elchi3
Elchi3 merged commit 0213c8c into mdn:main Aug 14, 2026
10 checks passed
@mdn-bot mdn-bot mentioned this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript size:m [PR only] 25-100 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants