workers-sdk
workers-sdk copied to clipboard
🐛 BUG: Error with Rust 1.82.0 in Wrangler
Which Cloudflare product(s) does this pertain to?
Wrangler
What version(s) of the tool(s) are you using?
wrangler 3.81.0, rustc 1.82.0
What version of Node are you using?
20.10.0
What operating system and version are you using?
Ubuntu 22.04
Describe the Bug
Observed behavior
When using Rust version 1.82.0, running npx wrangler dev or npx wrangler deploy can result in an error related to WebAssembly imports. The error message may vary slightly but typically includes.
✘ [ERROR] service core:user:rs-worker: Uncaught LinkError: WebAssembly.Instance(): Import #2 "./index_bg.js" "__wbg_fetch_bc7c8e27076a5c84": function import requires a callable at null.
When downgrading to Rust version 1.81.0, the problem disappears and everything works as expected.
Expected behavior
The runtime should start successfully when using npx wrangler dev or npx wrangler deploy without producing errors in the console.
Steps to reproduce
Please provide the following:
- A minimal working subset of your worker code
- Run your project with different versions of Rust (e.g., Rust 1.81.0 and Rust 1.82.0) to observe the differences in behavior.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
✘ [ERROR] service core:user:rs-worker: Uncaught LinkError: WebAssembly.Instance(): Import #2 "./index_bg.js" "__wbg_fetch_bc7c8e27076a5c84": function import requires a callable at null.