[Rust Docker] Use brew to install Rust on macOS
Rust with Homebrew on macOS
Homebrew is the Missing Package Manager for macOS (or Linux).
Rust is a language empowering everyone to build reliable and efficient software.
This article is about how to brew
to install Rust on macOS.
Prerequisites
-
Xcode Command Line Tools
The Xcode Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in macOS which is consists of the macOS SDK and command-line tools such as Clang, which are installed at thisFor more information about installing and using Xcode Command Line Tools, see the Xcode Command Line Tools
-
Homebrew
Homebrew is the Missing Package Manager for macOS (or Linux).For more information about installing and using Homebrew, see the Homebrew - https://brew.sh/.
Installation
Install Rust package.
1 | brew install rust |
Check rustc
and cargo
version.
1 | rustc --version |
References
[1] rust — Homebrew Formulae - https://formulae.brew.sh/formula/rust
[2] rustup-init — Homebrew Formulae - https://formulae.brew.sh/formula/rustup-init