Requirements

The following dependencies are needed to proceed. Install these before moving to the next step.

Install Rust

First, to work with Arch programs you will need Rust installed on your machine. If you don't have it, you can find installation instructions on the Rust website.

It is assumed that you are working with a stable Rust channel throughout this book.

Install Docker

Next, Docker is required to run Arch's containerized node infrastructure locally. The desktop client can be installed from the Docker website.

Install C++ Compiler

For MacOS users, this should already be installed alongside [gcc] so you can skip this section.

For Linux (Debian/Ubuntu) users, this must be installed if it isn't already. We will manually install the gcc-multilib.

sudo apt-get update
sudo apt-get install gcc-multilib

Install Solana CLI

To compile the examples, the Solana CLI toolchain must be installed. Execute the following commands to install the toolchain to your local system.

MacOS & Linux

sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)"

You can replace v1.18.18 with the release tag matching the software version of your desired release, or use one of the three symbolic channel names: stable, beta, or edge.

Ref: Solana Docs.

⚠️ NOTE: Installing rust through Homebrew likely leads to issues working with cargo-build-sbf. Below are some steps to get around this.

Steps:

  1. Uninstall rust
rustup uninstall self
  1. Ensure rust is completely removed
rustup --version

# should result:
zsh: command not found: rustup
  1. Reinstall rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Reinstall solana
sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)"

If you are still experiencing errors, join our Discord dev-chat channel for more support.

Clone the arch-local repository

Finally, we'll be using a repository specifically made to demonstrate Arch's capabilities and get started quickly. This repo contains a local Arch Network development environment, as well as some example programs that we'll touch on later in this book.

git clone https://github.com/arch-Network/arch-local && \
cd arch-local