Skip to content

Commit

Permalink
Documentations.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Jan 30, 2018
1 parent 7bdd469 commit 658f91d
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
name = "rustup-toolchain-install-master"
version = "0.1.0"
authors = ["kennytm <[email protected]>"]
description = "Install master rustc toolchain into rustup"
repository = "https://github.com/kennytm/rustup-toolchain-install-master"
readme = "README.md"
keywords = ["rustup"]
categories = ["development-tools"]
license = "MIT"

[badges]
maintenance = { status = "passively-maintained" }

[dependencies]
failure = "0.1"
Expand Down
16 changes: 16 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Copyright 2018 kennytm

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
rustup-toolchain-install-master
===============================

Installs compiler artifacts generated fresh from Rust's CI into `rustup`.

```
USAGE:
rustup-toolchain-install-master [FLAGS] [OPTIONS] <commits>...
FLAGS:
-a, --alt download the alt build instead of normal build
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-i, --host <host> the triples of host platform
-p, --proxy <proxy> the HTTP proxy for all download requests
-s, --server <server> the server path which stores the compilers [default: https://s3-us-west
-1.amazonaws.com/rust-lang-ci2]
-t, --targets <targets>... additional target platforms to install, besides the host platform
ARGS:
<commits>... full commit hashes of the rustc builds; all 40 digits are needed
```

Installation
------------

Install `rustup`, and then install from Cargo.

```sh
$ cargo install rustup-toolchain-install-master
```

Usage
-----

Download a normal toolchain:

```
$ rustup-toolchain-install-master def3269a71be2e737cad27418a3dad9f5bd6cd32
downloading <https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/def3269a71be2e737cad27418a3dad9f5bd6cd32/rustc-nightly-x86_64-apple-darwin.tar.xz>...
completed
downloading <https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rustc-builds/def3269a71be2e737cad27418a3dad9f5bd6cd32/rust-std-nightly-x86_64-apple-darwin.tar.xz>...
completed
toolchain `def3269a71be2e737cad27418a3dad9f5bd6cd32` is successfully installed!
```

Use it:

```
$ rustc +def3269a71be2e737cad27418a3dad9f5bd6cd32 -vV
rustc 1.25.0-nightly (def3269a7 2018-01-30)
binary: rustc
commit-hash: def3269a71be2e737cad27418a3dad9f5bd6cd32
commit-date: 2018-01-30
host: x86_64-apple-darwin
release: 1.25.0-nightly
LLVM version: 4.0
```

Remove it using `rustup`:

```
$ rustup uninstall def3269a71be2e737cad27418a3dad9f5bd6cd32
info: uninstalling toolchain 'def3269a71be2e737cad27418a3dad9f5bd6cd32'
info: toolchain 'def3269a71be2e737cad27418a3dad9f5bd6cd32' uninstalled
```

0 comments on commit 658f91d

Please sign in to comment.