首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Windows上通过CLI安装Rust?

如何在Windows上通过CLI安装Rust?
EN

Stack Overflow用户
提问于 2022-08-19 20:15:41
回答 1查看 108关注 0票数 0

我试图通过Windows (https://github.com/sansyrox/robyn/pull/263)上的命令行安装Rust。主锈蚀安装网站上的脚本只支持*nix。

在Windows上下载和安装Rust的命令有哪些?

EN

回答 1

Stack Overflow用户

发布于 2022-09-19 17:11:23

按照rustup中的说明进行操作。根据您选择的目标工具链下载rustup-init.exe

您可以使用--help查看配置安装的选项:

代码语言:javascript
复制
> .\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在脚本中下载安装程序。

代码语言:javascript
复制
> wget https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe
> .\rustup-init.exe -vy

注意,MSVC工具链将要求您安装Visual生成工具才能正常工作。我不知道如何在CLI环境中安装这些设备。希望该.exe的功能类似。

另请参阅:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73421853

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档