Hey folks, I'm trying to build the web REPL locally and wasm-bindgen
is failing, saying it needs libcurl.
Should we add that to our nix flake or something?
I know we build the web REPL as part of the nightly build so it must be working in CI. Maybe that has libcurl somehow.
I'm on an M1 Mac. Here are the commands to repro:
nix develop
cd crates/repl_wasm
./build-www.sh
and here's the error I get
(I've omitted the line with the full cc
linker command because Zulip says the message is too long. I think the only relevant thing is that it contains -lcurl
)
error: linking with `cc` failed: exit status: 1
= note: ld: library not found for -lcurl
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile `wasm-bindgen-cli` (bin "wasm-bindgen-test-runner") due to previous error
error: failed to compile `wasm-bindgen-cli v0.2.85`, intermediate artifacts can be found at `/tmp/nix-shell.4LEjSd/cargo-installFLSIdR`
Error: Installing wasm-bindgen with cargo
Caused by: Installing wasm-bindgen with cargo
Caused by: failed to execute `cargo install`: exited with exit status: 101
full command: "cargo" "install" "--force" "wasm-bindgen-cli" "--root" "/Users/briancarroll/Library/Caches/.wasm-pack/.wasm-bindgen-cargo-install-0.2.85" "--version" "0.2.85"
The same error reproduces if I just copy and paste the "full command" from the last line.
So it looks like currently we can only build the web REPL on Linux but not Mac.
I'll look into fixing this and setting up to test on macOS ci too.
Adding curl to the flake is indeed all that's required, I've setup PR#5768 for this along with added tests.
Last updated: Jul 06 2025 at 12:14 UTC