This guide walks you through setting up a complete Web3 development environment on macOS.
These provide compilers, linkers, and developer headers.
xcode-select --install🧑💻 A popup will appear. Click "Install", and wait for it to finish.
# Update Homebrew and existing packages
brew update && brew upgrade
# Install commonly needed tools for Rust, Node, Python, Solidity
brew install git cmake openssl pkg-config tree htop💡
cmake,openssl, andpkg-configare optional but commonly needed by Rust and Node packages with native bindings.
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/envbrew install go
go version# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 22
# Verify the Node.js version:
node -v # Should print "v22.16.0".
nvm current # Should print "v22.16.0".
# Verify npm version:
npm -v # Should print "10.9.2".
macOS includes Python 3 by default. Check with:
python3 --version
pip3 --versionpip3 install solc-select
solc-select install 0.8.24
solc-select use 0.8.24
solc --versionclang --version
rustc --version
cargo --version
go version
node -v
npm -v
python3 --version
solc --version| Extension | Description |
|---|---|
| GitLens | Git history, authorship, and blame info |
| Prettier | Auto code formatting |
| ESLint | JavaScript/TypeScript linting |
| Rust Analyzer | Rust language server for IntelliSense |
| Crates | See crate versions and docs inside Cargo.toml |
| CodeLLDB | Debugger for Rust and C++ |
| Go | Full support for Go development |
| Python | IntelliSense, linting, testing for Python |
| Pylance | High-performance Python language support |
| Solidity (Juan Blanco) | Syntax, linting, compiler for Solidity |
| Hardhat for VS Code | Optional support for Hardhat projects |
| npm Intellisense | Autocompletion for npm packages |
| Path Intellisense | Autocomplete relative file paths |
| Better Comments | Organize comments into alerts, queries, TODOs |
| TODO Highlight | Highlights TODOs and FIXMEs in code |
| Code Spell Checker | Spell checker for code comments and strings |
- Hardhat is the solidity tooling environement in JS/TS.
- learn more about hardhat here: https://hardhat.org
# 1. Create a new folder for your project
mkdir my-hardhat-project && cd my-hardhat-project
# 2. Initialize a new Node.js project (generates package.json)
npm init -y
# 3. Install Hardhat locally
npm install --save-dev hardhat
# 4. Create a basic Hardhat project
npx hardhat
# When prompted:
# Choose "Create a basic sample project"
# Press Enter for the default options
# Approve installing dependencies when asked
# verify installtion
# Should print the Hardhat CLI help output
npx hardhat
# Run the default test file provided in the sample project
npx hardhat test- Foundry, a fast, portable, and modular toolkit for Ethereum application development.
- With Foundry, end to end smart contract developement happens in Solidity.
# 1. Download and run the installation script
curl -L https://foundry.paradigm.xyz | bash
# 2. Source the environment to get access to foundryup
. ~/.bashrc
# 3. Install Foundry tools (forge, cast, anvil)
foundryup
# verify installation
forge --version # Should show version info
cast --version
anvil --version
# initialize a new project
# Create a new Forge project
forge init my-foundry-project
# Move into the project directory
cd my-foundry-project
# Run the default tests
forge test