我试图通过Windows (https://github.com/sansyrox/robyn/pull/263)上的命令行安装Rust。主锈蚀安装网站上的脚本只支持*nix。
在Windows上下载和安装Rust的命令有哪些?
发布于 2022-09-19 17:11:23
按照rustup中的说明进行操作。根据您选择的目标工具链下载rustup-init.exe:
您可以使用--help查看配置安装的选项:
> .\rustup-init.exe --help
rustup-init 1.24.3 (ce5817a94 2021-05-31)
The installer for rustup
USAGE:
rustup-init.exe [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--no-update-default-toolchain Don't update any existing default toolchain after install
--no-modify-path Don't configure the PATH environment variable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--default-host <default-host> Choose a default host triple
--default-toolchain <default-toolchain> Choose a default toolchain to install
--profile <profile> [default: default] [possible values: minimal, default, complete]
-c, --component <components>... Component name to also install
-t, --target <targets>... Target name to also install基本的-y应该适用于您;它将安装rustup和默认的工具链。当然,您可以使用wget在脚本中下载安装程序。
> wget https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe
> .\rustup-init.exe -vy注意,MSVC工具链将要求您安装Visual生成工具才能正常工作。我不知道如何在CLI环境中安装这些设备。希望该.exe的功能类似。
另请参阅:
https://stackoverflow.com/questions/73421853
复制相似问题