Skip to content

Getting Started

Prerequisites

Rust and Cargo (Required)

You need to have Rust installed on your machine. Read the official documentation for more details.

Installation

The following command will install the latest stable version of Rust and Cargo:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Verify Installation

You should now have Rust and Cargo installed. You can verify this by running:

Terminal window
cargo --version
# output: cargo 1.75.0 (1d8b05cdd 2023-11-20)
rustc --version
# output: rustc 1.75.0 (82e1608df 2023-12-21)

Solana CLI (Required)

You need to have the Solana CLI installed on your machine. Read the official documentation for more details.

Installation

The following command will install the stable version of the Solana CLI:

Terminal window
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

Verify Installation

You should now have the Solana CLI installed. You can verify this by running:

Terminal window
solana --version
# output: solana-cli 1.16.26 (src:835183af; feat:2294205250, client:SolanaLabs)

SPL Token CLI (Optional)

If you want to interact with SPL tokens, you need to have the SPL Token CLI installed on your machine. Read the official documentation for more details.

The following command will install the stable version of the SPL Token CLI:

Terminal window
cargo install spl-token-cli

You should now have the SPL Token CLI installed. You can verify this by running:

Terminal window
spl-token --version
# output: spl-token-cli 3.2.0

Anchor CLI (Optional)

If you want to write Anchor programs, you need to have the Anchor CLI installed on your machine. Read the official documentation for more details.

Terminal window
# Install the Anchor Version Manager (avm)
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
# Use the avm to install the latest version of the Anchor CLI
avm install latest
# Set the anchor cli to use the latest version
avm use latest

You should now have the Anchor CLI installed. You can verify this by running:

Terminal window
avm --version
# output: avm 0.29.0
anchor --version
# output: anchor-cli 0.29.0