Best way to install Rust on OS X: rustup or brew?

Hi all, long time Linux user here, with a Macbook Pro I'm not as familiar with but would like to do some programming/learning Rust on. It seems that rustup has replaced multirust as the recommended way of installing and maintaining multiple versions of Rust. Is it also recommended over using and managing Rust via Brew? Any pitfalls of either to be aware of?

Thanks!

1 Like

In my understanding, brew will let you only have one version of Rust installed, whereas rustup lets you have multiple.

I treat brew like the system package manager on Linux; that is, if it's a technology I'm actively developing in, I don't use it, and use custom toolchain build stuff. But if I'm not actively developing in it, I use the system manager.

So I would argue brew is correct if you're not actively hacking on Rust stuff, but have some sort of need for Rust on your system, but rustup is correct if you're actively developing Rust code.

4 Likes

Thanks, I do the same on Linux. Will be hacking so rustup it is then.

Another good reason to use rustup is, as is mentioned in the cross compiling discussion, that it makes adding new build targets rather easy.

1 Like

Is is possible to at least install rustup with Homebrew? Right now it all I see is a rustup-init which I don't trust to adhere to brew's installation rules.

1 Like

Although, i am big fan of my nix-shell environment on top of nixos/nixpkgs on my mac, i had to admit that rustup is the most convenient solution for now. The support of having multiple toolchains incl. rust-doc and rust-src is unbeatable. However, i suppose it is a matter of time for package managers to catch up with the rust ecosystem. AFAIK on NixOS we have already adaptors for cargo/crates.io like mkRustCrate on the backlog.