Skip to content

Comment on Cargo, Rust's Package Manager

Comments

I would really love to see some docs on how to actually install and get started with Cargo.

It doesn't ship with Rust and the docs on GitHub and crates.io are not very enlightening.

This was how I installed it (Mac):

  1) Install latest version of Rust found here: http://www.rust-lang.org
  2) git clone --recursive git@github.com:rust-lang/cargo.git
  3) make
  4) make install (could be that sudo is needed for you)

I'm putting rust in $HOME/bin (and other self compiled software). You can change the default installation from /usr/local by running

  DESTDIR=$HOME make install

There is no brew formula?

For rust? There is...cargo not so much

aroch:~/staging/|⇒ brew info rust

rust: stable 0.10 (bottled), HEAD

http://www.rust-lang.org/

/usr/local/Cellar/rust/0.10 (74 files, 174M) *

  Poured from bottle
From: https://github.com/Homebrew/homebrew/commits/master/Library/...

aroch:~/staging/|⇒ brew info cargo

Error: No available formula for cargo

Rust has a brew package. Cargo is new so it may be a day or three before it gets out there too.

Hmm, well, rust's brew seems a little outdated (0.10), so if you are intent on using Cargo soon, I would recommend on building rust yourself or grabbing a new binary from their website.

There is a homebrew-cask of Rust's nightly binary. I think this should work:

  brew tap caskroom/cask
  brew install brew-cask
  brew tap caskroom/versions
  brew cask install rust-nightly

Stuff being either in Cask or Homebrew is just terrible. Homebrew also has a versions tap. Those two projects should combine efforts and remove ambiguity.

I 100% agree with you. It took me like an hour to figure out where I thought it made sense to put rust-nightly, and I'm still not really sure I did it right. But it works and is way better than the morning compilation cronjob I used to use.

I agree, it works, but we need to keep pressing those guys... or contribute. Cask still doesn't have reinstall/upgrade. As far as I know, Homebrew can't upgrade packages with head versions, and, worst pain of all - Homebrew doesn't support Yosemite or any unreleased OS X version. Being a tool for developers primarily, all the above are must-haves!

Yesterday started my contract with Mozilla to write documentation. Today, I'm starting on re-writing the tutorial: https://github.com/rust-lang/rust/pull/15131 (apparently, bors is a bit backed up)

The new tutorial will be based around 'real' Rust development, and so will assume Cargo.

That said, http://crates.io/ should have install instructions on the site. I'll open a ticket and get on that.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.