I attempted the tutorial here but ran into a problem with openssl:
I installed cargo
$ curl https://sh.rustup.rs -sSf \| sh
and configured my shell with:
$ source $HOME/.cargo/env
I then succesfully installed wrangler with
$ cargo install wrangler
and tried to generate a "Hello, World" project with:
$ wrangler generate demo
However, that throws an error:
dyld: Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib
Referenced from: /Users/userspace/Library/Caches/.wrangler/cargo-generate-2665b6ba17ab8008/cargo-generate
Reason: image not found
Error: ErrorMessage { msg: "failed to execute /Users/userspace/Library/Caches/.wrangler/cargo-generate-2665b6ba17ab8008/cargo-generate generate --git https://github.com/cloudflare/rustwasm-worker-template --name demo: exited with signal: 6" }
So I instead tried
$ cargo install cargo-generate
which led to a similar error:
It looks like you're compiling on macOS, where the system contains a version of
OpenSSL 0.9.8. This crate no longer supports OpenSSL 0.9.8.
As a consumer of this crate, you can fix this error by using Homebrew to
install the openssl package, or as a maintainer you can use the openssl-sys
0.7 crate for support with OpenSSL 0.9.8.
Unfortunately though the compile cannot continue, so aborting.
', /Users/username/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.43/build/find_normal.rs:150:5
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile cargo-generate v0.2.2, intermediate artifacts can be found at /var/folders/j7/_vypfcb179g8wbw84pkrrkx00000gn/T/cargo-installdX02Cv
I just ran into the same issue and got it working by installing [email protected] via homebrew:
brew install [email protected]
afterwards:
$ wrangler generate demo
⬇️ Installing cargo-generate...
🐑 Generating a new rustwasm worker project with name 'demo'...
🔧 Creating project called `demo`...
✨ Done! New project created /Users/user/tmp/demo
That did it - solved my issue as well. Thanks for the help!
hey folks! would either of you be interested in updating the README to include the instruction for fixing this? i think it'd be valuable! (if not, i'll do it, but i'd love to have more contributors to the project <3)
Most helpful comment
I just ran into the same issue and got it working by installing
[email protected]via homebrew:afterwards: