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:
Verify Homebrew installation:
Step 2: Install Required Packages
Update Homebrew:
Install required packages:
Step 3: Install Rust
Download and run the
rustup
installation script:Follow the prompts for default installation.
Update your current shell to include Cargo:
Verify Rust installation:
Configure Rust to use the stable version and update:
Add the nightly toolchain and WebAssembly (wasm) targets:
Verify the configuration:
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:
Step 2: Compile the Node Template
Compile the node template:
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