wasm-pack is unable to download the required tools for optimizing wasm-opt.
This fails the build. I'm left with only option of disabling wasm optimizations with wasm-opt = false.
$ wasm-pack build
failed with error
Error: failed to download from https://github.com/WebAssembly/binaryen/releases/download/version_114/binaryen-version_114-x86_64-linux.tar.gz
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
For me issue was Default @SECLEVEL
As I'm sitting behind proxy with weaker security. To work with weaker security Default CipherString was lowered to 1.
When I checked
/etc/ssl/openssl.cnfwasm-packrelies onbinary-installfor downloading and installingwasm-optThe root cause was one of the dependency of binary-install.
Check the following dependency graph
binary-install -> ureq -> rustlsAnd
rustlsstatesPlease upgrade
DEFAULT:@SECLEVEL