astronaut

How to setup rust with rustup on MacOS using Homebrew

How to setup rust with rustup on MacOS using Homebrew

April 18, 2025 1 min read
setup-rust-macos-rustup

Installing Rust on macOS is simple and efficient using Homebrew, a popular package manager that makes software installation easy and manageable.

Install Homebrew

If you haven't installed Homebrew, follow the official guide at brew.sh.

Install Rust Using Rustup

Once Homebrew is installed, install Rust using Rustup:

brew install rustup
rustup-init

This installs:

  • rustc – The Rust compiler
  • cargo – The Rust package manager and build tool
  • rustup – The Rust toolchain manager

Configure the Environment

Ensure Rust is accessible by refreshing your environment variables:

source ~/.zshenv

Verify Installation

Check if Rust is installed correctly:

rustc --version

Rust is now installed and ready to use on macOS!

Share this content: