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

🐛 BUG: cant build rust example template #3606

Closed
mkorolyov opened this issue Jul 13, 2023 · 2 comments
Closed

🐛 BUG: cant build rust example template #3606

mkorolyov opened this issue Jul 13, 2023 · 2 comments
Labels
bug Something that isn't working

Comments

@mkorolyov
Copy link

Which Cloudflare product(s) does this pertain to?

Wrangler

What version of Wrangler are you using?

3.2.0

What operating system are you using?

Mac

Describe the Bug

i've cloned https://github.com/cloudflare/rustwasm-worker-template, replaced project name in cargo.yaml and wrangler.toml and tried to run deprecated wrangler build or wrangler deploy --dry-run and both are failing with same error:

❯ wrangler deploy --dry-run --outdir=dist
 ⛅️ wrangler 3.2.0
------------------
Running custom build: cargo install -q worker-build && worker-build --release
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
    Finished release [optimized] target(s) in 0.08s
[INFO]: ⬇️  Installing wasm-bindgen...
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: ✨   Done in 0.61s
[INFO]: 📦   Your wasm pkg is ready to publish at /Users/mk/src/cf_workers/rustwasm-relevant-features-reverse-proxy/build.
✘ [ERROR] Could not resolve "./index_bg.wasm"

    index_bg.js:1:22:
      1 │ import * as wasm from './index_bg.wasm';
        ╵                       ~~~~~~~~~~~~~~~~~

1 error
Error: esbuild exited with status exit status: 1

✘ [ERROR] Command failed with exit code 1: cargo install -q worker-build && worker-build --release

@mkorolyov mkorolyov added the bug Something that isn't working label Jul 13, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jul 13, 2023
@dev-ardi
Copy link

cloudflare/workers-rs#310
cloudflare/rustwasm-worker-template#41

You can workaround this by fixing the version number

[build]
command = "cargo install -q worker-build --version ^0.0.8 && worker-build --release" # required

@mrbbot
Copy link
Contributor

mrbbot commented Oct 9, 2023

Closing this as it's being tracked in cloudflare/workers-rs#310

@mrbbot mrbbot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2023
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

No branches or pull requests

4 participants