DEV Community

Yannis Rizos
Yannis Rizos

Posted on

Installing Rust on macOS with Homebrew

This Sunday, I had a bit of extra time, so I decided to brush up on Rust. Whether you are a seasoned developer or just starting out, getting your tools set up is always the first step.

While Rust’s official installation tool, rustup, is excellent and versatile, I prefer using Homebrew whenever possible. It is simple, familiar, and keeps everything neatly managed in one place.

Step 1: Install Rust

Launch the terminal and run the following command to install Rust:

brew install rust
Enter fullscreen mode Exit fullscreen mode

This will install both Rust and Cargo, Rust’s package manager and build system. Cargo simplifies managing dependencies, building projects, and running tests in Rust. It is an essential tool for any Rust developer.

Step 2: Verify the Installation

After installation, confirm everything is set up correctly by checking the Rust version:

rustc --version
cargo --version
Enter fullscreen mode Exit fullscreen mode

If the command returns the Rust version number, you are all set!

Step 3: Keeping Rust Updated

Homebrew makes it easy to update Rust when new versions are released. Periodically run the following commands to keep Rust up to date:

brew update
brew upgrade rust
Enter fullscreen mode Exit fullscreen mode

That is it, you are ready to code in Rust! 🎉

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay