Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support picking from multiple Rust version #967

Closed
SimonSapin opened this issue Nov 24, 2014 · 7 comments
Closed

Support picking from multiple Rust version #967

SimonSapin opened this issue Nov 24, 2014 · 7 comments
Labels
A-configuration Area: cargo config files and env vars

Comments

@SimonSapin
Copy link
Contributor

If Rust gains support for installing multiple versions in parallel (see rust-lang/rust#19263 for details), Cargo should have a mechanism to pick which one is used. Maybe an environment variable? RUSTC=rustc-beta cargo test

@SimonSapin
Copy link
Contributor Author

RUSTC=rustc-beta cargo test doesn’t help Cargo find the corresponding rustdoc though, so it’s probably not the right mechanism. If the naming convention for rust-lang/rust#19263 is regular enough, it could be something like cargo --rust=beta test.

Whatever the mechanism for command-line invocations, .cargo/config could also have a key for setting the default.

@pwoolcoc
Copy link
Contributor

how about defining a RUSTROOT in order to tell cargo the location of rustc and rustdoc, similar to GOROOT? So, defining it as RUSTROOT=/usr/local cargo test would cause cargo to look for rustc and rustdoc in /usr/local/bin?

@SimonSapin
Copy link
Contributor Author

@pwoolcoc, this is assuming rust-lang/rust#19263 provides a way to have multiple Rust version in the same prefix/root. So there is not much to discuss in this bug until there’s a plan on how to resolve that one, but in the meantime this is a note that something will be needed.

@codyps
Copy link
Contributor

codyps commented Dec 3, 2014

Having a RUSTC env var would be useful to me as well.

@DeadDork
Copy link

+1

@alexcrichton
Copy link
Member

I think that given the current state of affairs multirust is filling this niche quite nicely, although I would still like a RUSTC env var

@SimonSapin
Copy link
Contributor Author

Multirust is based on having multiple "toolchains", each containing different versions of an arbitrary number of tools, including rustc, rustdoc, and Cargo.

Long term, I think it makes more sense to stabilize the rustc command-line interface and have a single version of Cargo that can drives multiples versions of rustc+rustdoc.

alexcrichton added a commit to alexcrichton/cargo that referenced this issue May 18, 2015
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.

Closes rust-lang#967
alexcrichton added a commit to alexcrichton/cargo that referenced this issue May 19, 2015
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.

Closes rust-lang#967
alexcrichton added a commit to alexcrichton/cargo that referenced this issue May 19, 2015
In addition to global RUSTC/RUSTDOC env vars, this commit recognizes
`build.rustc` and `build.rustdoc` as configuration keys for Cargo to instruct
what tools should be used instead of the default.

Closes rust-lang#967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars
Projects
None yet
Development

No branches or pull requests

5 participants