feat: support `[wasm_modules]`
See original GitHub issueWe currently support .wasm
modules, so in module-format workers, you can import wasm and instantiate it (like, import something from './something.wasm';
).
We should also support “legacy” style wasm, so anything passed to [wasm_modules]
in wrangler.toml
is available as a binding in service-worker format workers.
(I was surprised to learn of this configuration field today. It makes sense that this exists and works, I was just surprised it doesn’t appear to be documented at https://developers.cloudflare.com/workers/)
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
WebAssembly | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end ... WebAssembly or "wasm" is a new portable, size- and load-time-efficient ......
Read more >feat: support WebAssembly (Wasm) imports in ESM modules ...
Summary Closes #11011 import * as myWasm from './my-wasm.wasm'; const myWasmModule = await import('./my-wasm.wasm'); const myWasmModule ...
Read more >WebAssembly module - fastText
a browser that supports WebAssembly. Building WebAssembly binaries. First, download and install emscripten sdk as described here. We need to make sure we ......
Read more >WebAssembly (WASM) - SDK Documentation
Direct compilation of C/C++ projects into WebAssembly (WASM). Debugging of WebAssembly modules by attaching to the game executable. Full support for the ...
Read more >WebAssembly.Module - MDN Web Docs
Chrome Edge
Module Full support. Chrome57. Toggle history Full support. Edge16. Toggle...
Module() constructor Full support. Chrome57. Toggle history Full support. Edge16. Toggle...
customSections Full support....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure, I used the output of the workers-rs base project https://github.com/cloudflare/workers-rs to generate that example folder
Cloudflare workers does it a little differently at the moment, it’s imported as WebAssembly.Module that you can instantiate. Example here https://github.com/cloudflare/wrangler2/blob/main/examples/wasm-app/worker/module/export_wasm.js Here’s an older blogpost with some details https://blog.cloudflare.com/webassembly-on-cloudflare-workers/