如何删除目标 wasm32-wasi 并添加新的 wasm32-wasip1

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

当我尝试

rustup update
时,我得到

error: component 'rust-std' for target 'wasm32-wasi' is unavailable for download for channel 'nightly'
error: Sometimes not all components are available in any    given nightly. If you don't need the component, you could try a minimal installation with:
error: 
error:     rustup toolchain add nightly --profile minimal
error: 
error: If you require these components, please install and use the latest successful build version,
error: which you can find at <https://rust-lang.github.io/rustup-components-history>.
error: 
error: After determining the correct date, install it with a command such as:
error: 
error:     rustup toolchain install nightly-2018-12-27
error: 
error: Then you can use the toolchain with commands such as:
error: 
error:     cargo +nightly-2018-12-27 build

快速搜索显示有关此的博客。基本上,自 2024 年 10 月 17 日起,

wasm32-wasi
不再在每晚提供。据此我们应该使用
wasm32-wasip1

rust rust-cargo rustup
1个回答
0
投票

这些命令对我有用,

rustup target remove wasm32-wasi
rustup update
rustup target add wasm32-wasip1
© www.soinside.com 2019 - 2024. All rights reserved.