Skip to content
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

Support ES Module Integration Proposal #4287

Open
dsherret opened this issue Nov 22, 2024 · 3 comments
Open

Support ES Module Integration Proposal #4287

dsherret opened this issue Nov 22, 2024 · 3 comments

Comments

@dsherret
Copy link
Contributor

dsherret commented Nov 22, 2024

Deno 2.1 added support for standard Wasm modules (though there was a bug where it was missing exports like memory, though that's now fixed in the latest canary version deno upgrade canary or in the released version if this is being read after November 28th).

https://docs.deno.com/runtime/reference/wasm/#wasm-modules

It would be really cool to have support for it in wasm-bindgen because it would mean that the .wasm files would be part of the module graph, so remote Deno modules wouldn't need to do orchestration for downloading and caching the wasm files anymore.

Since Wasm modules are implemented in a standard way in Deno (or at least should be 😅), this should translate to having support for the browser as well.

Edit: Or I guess this is the "bundler" output? I didn't test yet if it works with imports.

@daxpedda
Copy link
Collaborator

Edit: Or I guess this is the "bundler" output? I didn't test yet if it works with imports.

Unfortunately I have absolutely no idea about Deno or the bundler output. I will also have a hard time reviewing something I absolutely have no understanding of.

In conclusion: I'm happy to do my best to review fixes to existing targets, but adding a new target is out of the cards unless someone steps up and offer long-term maintenance for that target in wasm-bindgen.

@dsherret dsherret changed the title Support output for Wasm modules in Deno Support output for Wasm modules Nov 28, 2024
@dsherret dsherret changed the title Support output for Wasm modules Support output for standard Wasm imports Nov 28, 2024
@dsherret
Copy link
Contributor Author

dsherret commented Nov 28, 2024

I renamed the title. This is not Deno specific. It's just standard Wasm imports (which is the future and more ergonomic because the Wasm module is part of the module graph). It feels like something this project would want to support? It would allow dropping a bunch of the outputs in the future.

https://github.com/WebAssembly/esm-integration/blob/main/proposals/esm-integration/EXAMPLES.md

@daxpedda daxpedda changed the title Support output for standard Wasm imports Support ES Module Integration Proposal Nov 28, 2024
@daxpedda
Copy link
Collaborator

That's definitely in scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants