question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: support `[wasm_modules]`

See original GitHub issue

We 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:closed
  • Created 2 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
threepointonecommented, Jun 16, 2022

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

1reaction
threepointonecommented, Jun 16, 2022

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/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found