MacOS
Setting Up a macOS Development Environment for Rust
This guide will help you install Rust and set up a Substrate development environment on Apple macOS computers with either Intel or Apple M1 processors.
Before You Begin
Ensure your computer meets the following requirements:
Operating System: macOS 10.7 Lion or later
Processor: At least 2GHz (3GHz recommended)
Memory: At least 8 GB RAM (16 GB recommended)
Storage: At least 10 GB available space
Internet: Broadband connection
Step 1: Install Homebrew
If you don't have Homebrew installed, you should install it to manage packages on macOS.
Open the Terminal application.
Download and install Homebrew by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Verify Homebrew installation:
brew --version
Step 2: Install Required Packages
Update Homebrew:
brew update
Install required packages:
brew install protobuf openssl cmake python git
Step 3: Install Rust
Download and run the
rustup
installation script:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Follow the prompts for default installation.
Update your current shell to include Cargo:
source ~/.cargo/env
Verify Rust installation:
rustc --version
Configure Rust to use the stable version and update:
rustup default stable rustup update rustup target add wasm32-unknown-unknown
Add the nightly toolchain and WebAssembly (wasm) targets:
rustup update nightly rustup target add wasm32-unknown-unknown --toolchain nightly
Verify the configuration:
rustup show rustup +nightly show
Compile a Substrate Node
Now that Rust is installed and configured, you can compile a Substrate node.
Step 1: Clone the Node Template Repository
Clone the Substrate node template repository:
git clone https://github.com/devolved-ai/argochain cd argochain
Step 2: Compile the Node Template
Compile the node template:
cargo build --release
The compilation process may take several minutes.
Your development environment is now set up for Substrate development.
Next Steps
Your local computer is ready for Substrate development activity. For further resources and guides, visit the Substrate Developer Hub.
Last updated