无法构建 wasm-pack 项目 - `wasm-opt` 下载失败

问题描述 投票:0回答:1

wasm-pack
无法下载优化所需的工具
wasm-opt

这会使构建失败。我只剩下使用

wasm-opt = false
禁用 wasm 优化的选项。

$ wasm-pack build

因错误而失败

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`.
rust webassembly rust-wasm wasm-pack wasm-opt
1个回答
0
投票

对我来说问题是默认@SECLEVEL

当我检查时

/etc/ssl/openssl.cnf

CipherString = DEFAULT:@SECLEVEL=1 

wasm-pack
依赖于
binary-install
进行下载和安装
wasm-opt

根本原因是binary-install的依赖之一。

检查以下依赖关系图

binary-install -> ureq -> rustls

rustls
状态

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.

请升级

DEFAULT:@SECLEVEL

© www.soinside.com 2019 - 2024. All rights reserved.