#rustup #toolchain #artifact #rustc #download #compiler #ci

app rustup-toolchain-install-master

将 master rustc 工具链安装到 rustup 中

12 个稳定版本

1.8.0 2020年6月27日
1.7.3 2020年1月5日
1.7.2 2019年11月17日
1.6.1 2019年5月4日
0.1.0 2018年1月30日

#509开发工具

Download history 708/week @ 2023-12-01 1155/week @ 2023-12-08 1223/week @ 2023-12-15 813/week @ 2023-12-22 397/week @ 2023-12-29 685/week @ 2024-01-05 783/week @ 2024-01-12 893/week @ 2024-01-19 600/week @ 2024-01-26 547/week @ 2024-02-02 1547/week @ 2024-02-09 1309/week @ 2024-02-16 3150/week @ 2024-02-23 2736/week @ 2024-03-01 1059/week @ 2024-03-08 650/week @ 2024-03-15

7,782 每月下载次数

MIT 许可证

22KB
451 代码行

rustup-toolchain-install-master

Travis status

将 Rust 的 CI 生成的新编译器工件安装到 rustup 中。

USAGE:
    rustup-toolchain-install-master [FLAGS] [OPTIONS] [--] [commits]...

FLAGS:
    -a, --alt           download the alt build instead of normal build
        --dry-run       Only log the URLs, without downloading the artifacts
    -f, --force         Replace an existing toolchain of the same name
    -h, --help          Prints help information
    -k, --keep-going    Continue downloading toolchains even if some of them failed
    -V, --version       Prints version information

OPTIONS:
        --channel <channel>              specify the channel of the commits instead of detecting it automatically
    -c, --component <components>...      additional components to install, besides rustc and rust-std
        --github-token <github-token>    An authorization token to access GitHub APIs
    -i, --host <host>                    the triples of host platform
    -n, --name <name>                    the name to call the toolchain
    -p, --proxy <proxy>                  the HTTP proxy for all download requests
    -s, --server <server>                the server path which stores the compilers [default: https://ci-artifacts.rust-lang.org]
    -t, --targets <targets>...           additional target platforms to install rust-std for, besides the host platform

ARGS:
    <commits>...    full commit hashes of the rustc builds, all 40 digits are needed; if omitted, the latest master
                    commit will be installed

安装

安装 rustup,然后从 Cargo 中安装。

$ cargo install rustup-toolchain-install-master

用法

下载普通工具链

$ rustup-toolchain-install-master 4fb54ed484e2239a3e9eff3be17df00d2a162be3
detecting the channel of the `4fb54ed484e2239a3e9eff3be17df00d2a162be3` toolchain...
downloading <https://ci-artifacts.rust-lang.org/rustc-builds/4fb54ed484e2239a3e9eff3be17df00d2a162be3/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz>...
47.39 MB / 47.39 MB [=======================================] 100.00 % 10.20 MB/s
downloading <https://ci-artifacts.rust-lang.org/rustc-builds/4fb54ed484e2239a3e9eff3be17df00d2a162be3/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz>...
15.91 MB / 15.91 MB [=======================================] 100.00 % 9.95 MB/s
toolchain `4fb54ed484e2239a3e9eff3be17df00d2a162be3` is successfully installed!

使用它

$ rustc +4fb54ed484e2239a3e9eff3be17df00d2a162be3 -vV
rustc 1.46.0-nightly (4fb54ed48 2020-06-14)
binary: rustc
commit-hash: 4fb54ed484e2239a3e9eff3be17df00d2a162be3
commit-date: 2020-06-14
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0

使用 rustup 删除它

$ rustup uninstall 4fb54ed484e2239a3e9eff3be17df00d2a162be3
info: uninstalling toolchain '4fb54ed484e2239a3e9eff3be17df00d2a162be3'
info: toolchain '4fb54ed484e2239a3e9eff3be17df00d2a162be3' uninstalled

依赖

~8–23MB
~365K SLoC