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] Default installation leads to wasm-pack exits with core dumped #304

Open
1 task done
auyer opened this issue Apr 10, 2023 · 0 comments · May be fixed by #305
Open
1 task done

[BUG] Default installation leads to wasm-pack exits with core dumped #304

auyer opened this issue Apr 10, 2023 · 0 comments · May be fixed by #305

Comments

@auyer
Copy link

auyer commented Apr 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What version of workers-rs are you using?

0.0.15

worker-build 0.0.9 and 0.0.7

Describe the bug

Worker-rs installs a version of wasm-pack that can be incompatible with some systems due to curl or libc incompatibilities. There is an alternative solution in the end of this issue.

This is how the output looks like:

npm run dev --local

> dev
> wrangler dev --local

 ⛅️ wrangler 2.15.0 
--------------------
Want to try out the next version of local mode using the open-source Workers runtime?
Switch out --local for --experimental-local and let us know what you think at https://discord.gg/cloudflaredev !
Running custom build: cargo install -q worker-build --version 0.0.9 && worker-build --release
Error: wasm-pack exited with status signal: 11 (SIGSEGV) (core dumped)

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


If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose

There is a solution: you can overwrite the wasm-pack version that gets installed by worker-rs with curl/static-curl feature enabled. This builds curl into the binary, and fixes any possible incompatibilities.

cargo install wasm-pack --features curl/static-curl

I will open a PR that would solve this issue by installing this feature by default. But I am not sure it should be merged.

Steps To Reproduce

In a more up-to-date Linux distro (like arch-based ones), run the getting started routine.

  1. npm init cloudflare project_name worker-rust
  2. cd project_name
  3. npm install
  4. npm run dev
auyer added a commit to auyer/workers-rs that referenced this issue Apr 10, 2023
fixes cloudflare#304

wasm-pack will exit with core dumped on some machines because of libc or curl compatibility issues.
This feature solves it.
@auyer auyer linked a pull request Apr 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant