Multirust-rs is a reimplementation of multirust in rust. It provides both a command line interface, and a rust library, so it's trivial to integrate it with external tools.
Add multirust-rs or multirust-dist as a standard cargo dependency to your project, depending on your requirements.
- Windows GNU 64-bit installer
- Windows MSVC 64-bit installer
- Windows GNU 32-bit installer
- Windows MSVC 32-bit installer
- Linux 64-bit installer
- Linux 32-bit installer
- Mac 64-bit installer
- Mac 32-bit installer
Binaries for other platforms are not yet available. Follow the instructions below for installing from source.
Run this command in a writable directory:
git clone --depth 1 https://github.com/Diggsey/multirust-rs.git multirust-rs && cd multirust-rs && cargo run --release self install -a
This will automatically add ~/.multirust/bin
to your PATH (remove -a
to disable this behavior).
On linux, this is done by appending to ~/.profile
.
On windows, this is done by modifying the registry entry HKCU\Environment\PATH
.
The changes to PATH will not take effect immediately within the same terminal.
The multirust-rs
directory which is created is no longer required once installation has completed, but keeping it around will make future updates much faster:
cd multirust-rs && git pull && cargo run --release install
multirust 0.0.5
Diggory Blake
Port of multirust to rust
USAGE:
multirust [FLAGS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Enable verbose output
SUBCOMMANDS:
ctl
default Set the default toolchain.
delete-data Delete all user metadata.
doc Open the documentation for the current toolchain.
help Prints this message
list-overrides List all overrides.
list-toolchains List all installed toolchains.
override Set the toolchain override.
proxy Proxy a command.
remove-override Remove an override.
remove-toolchain Uninstall a toolchain.
run Run a command.
self Commands for managing multirust itself.
show-default Show information about the current default.
show-override Show information about the current override.
update Install or update a given toolchain.
upgrade-data Upgrade the ~/.multirust directory.
which Report location of the currently active Rust tool.
Standard toolchain names have the following form:
[<arch>-][<os>-][<env>-]<channel>[-<date>]
<arch> = i686|x86_64
<os> = pc-windows|unknown-linux|apple-darwin
<env> = gnu|msvc
<channel> = stable|beta|nightly
<date> = YYYY-MM-DD
Any combination of optional parts are acceptable.
Parts of the target triple which are omitted, will default to that of the host. If the date is omitted, the toolchain will track the most recent version.
The following environment variables can be used to customize the behaviour of multirust-rs:
-
MULTIRUST_TOOLCHAIN
(default: none) If set, will override the toolchain used for all rust tool invocations. A toolchain with this name should be installed, or invocations will fail. -
MULTIRUST_DIST_ROOT
(default:https://static.rust-lang.org/dist
) Sets the root URL for downloading packages. You can change this to instead use a local mirror, or to test the binaries from the staging directory. -
MULTIRUST_HOME
(default:~/.multirust
or%LOCALAPPDATA%/.multirust
) Sets the root multirust folder, used for storing installed toolchains and configuration options. -
MULTIRUST_GPG_KEY
(default: none) Sets the GPG key used to verify the signatures of downloaded files. WARNING: GPG signature verification is not yet implemented.
-
Set the default toolchain to the latest nightly:
multirust default nightly
-
For the current directory, use the most recent stable build using the MSVC linker:
multirust override msvc-stable
-
For the current directory, use a 32-bit beta build instead:
multirust override i686-beta
-
For the current directory, use a nightly from a specific date:
multirust override nightly-2015-04-01
-
Combine these:
multirust override i686-msvc-nightly-2015-04-01
-
Install a custom toolchain using an installer:
multirust override my_custom_toolchain --install "/home/user/RustInstaller.tar.gz"
-
Install a custom toolchain using an installer from the internet (linux):
multirust override my_custom_toolchain --install "http://domain.tld/installer.tar.gz"
-
Install a custom toolchain by symlinking an existing installation:
multirust override my_custom_toolchain --link-local "C:\RustInstallation"
-
Install a custom toolchain by copying an existing installation:
multirust override my_custom_toolchain --copy-local "C:\RustInstallation"
-
Switch back to the default toolchain for the current directory:
multirust remove-override
-
See which toolchain will be used in the current directory:
multirust show-override
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.