cargo-website icon indicating copy to clipboard operation
cargo-website copied to clipboard

There are no installation instructions for existing Rust users

Open kornelski opened this issue 11 years ago • 2 comments

I'm not sure if rustup.sh is safe to use on top of an installation created by homebrew, and the script unfortunately doesn't support installation of cargo only - https://github.com/rust-lang/cargo/issues/229

I think it would be better if crates.io recommended a script that can detect whether there is an existing compatible installation of rustc and installs only cargo in that case.

kornelski avatar Jul 21 '14 18:07 kornelski

+1, I've installed rust through homebrew and am unsure what I'm supposed to do to get cargo working. Considering brew is fairly common for OS X programmers it wouldn't hurt to have some elaborate instructions available.

yoshuawuyts avatar Nov 16 '14 16:11 yoshuawuyts

I'm in the same boat. ~~This is blocking me from using Rust (at least, for larger projects) because the last time I used a special sauce script to install outside of a package manager it made uninstallation very hard, so I'm very reluctant to use rustup.sh.~~ (See edit) But per the discussion here it seems that brew install cargo can't be done until Cargo is guaranteed to be compilable with the tapped version of Rust. Is there another way to accomplish the Cargo install via brew in the interim?

I've found two alternative community taps, neither of which really work.

  • A nightly rust-cargo tap here. But, since rust-nightly and cargo-nightly are co-dependent in this tap, so it can't be used to install cargo if rust is already installed.
  • A non-functioning cargo-only tap here which fails first due to no SHA1 and then from a make error. (make: *** No targets specified and no makefile found. Stop.) -- which is simply because the formula author hasn't updated the script since June 25th.

Of the two it seems that dtrebbien's could be adapted for these means. I haven't really tried to brew edit their formula, but maybe it'd be worth just hacking in the ./configure call and hoping that install.sh doesn't biff up too many other things...

Then again, I could just install the nightlies and deal with the MISSINGNO features for the time being. It's certainly worth being able to use Rust.

Edit: I revisited the guide and noticed that rustup.sh does support an --uninstall flag, which means this is not an issue for me anymore. I'll also note that rustup.sh runs on the order of minutes, while building with brew is on the order of hours, so I'll shut up about brew for the time being. I will say that the uninstall flag isn't noted in the 30-minute guide, and it might be useful to note it there.

dbarella avatar Dec 01 '14 19:12 dbarella