-1

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
Arjun
  • 3,248
  • 18
  • 35

1 Answers1

0

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.cnf

CipherString = DEFAULT:@SECLEVEL=1 

wasm-pack relies on binary-install for downloading and installing wasm-opt

The root cause was one of the dependency of binary-install.

Check the following dependency graph

binary-install -> ureq -> rustls

And rustls states

For reasons [explained in the manual](https://docs.rs/rustls/latest/rustls/manual/_02_tls_vulnerabilities/index.html), rustls does not and will not support:

SSL1, SSL2, SSL3, TLS1 or TLS1.1.
RC4.
DES or triple DES.
EXPORT ciphersuites.
MAC-then-encrypt ciphersuites.
Ciphersuites without forward secrecy.
Renegotiation.
Kerberos.
Compression.
Discrete-log Diffie-Hellman.
Automatic protocol version downgrade.

Please upgrade DEFAULT:@SECLEVEL

Arjun
  • 3,248
  • 18
  • 35