Essential Solana Developer Tools to Start Building on Solana
Written by Alchemy
Reviewed by Brady Werkheiser
In the past, a majority of blockchain and web3 development took place on the Ethereum blockchain. However, as competitor blockchains have surfaced in recent years, developers have begun to explore other blockchains in an effort to find a more developer-friendly and efficient solution.
In this search, many have turned to the Solana blockchain. The Solana blockchain, one of the largest blockchains known for its efficient design, fast transaction speeds, and less crowded developer environment, solves many of the inefficiencies observed with the Ethereum network.
In an effort to promote development, Solana has formed a strategic partnership with Alchemy with Alchemy fully supporting Solana. Earlier this summer, Alchemy announced its expansion to the Solana ecosystem in an effort to improve the Solana blockchain development experience.
This article covers a broad introduction to Solana development through an array of explanations and tutorials.
Solana Development Tools
To start building on the Solana blockchain, devs must first get a Solana RPC endpoint and the correct developer environment configured. As a result, users must first become familiar with tools like the Solana Tool Suite, Rust, and Anchor.
After you're familiar with the fundamental Solana developer tools, you can start interacting with more advanced tooling like Metaplex, and you can start launching your smart contracts and dApps to the Solana Devnet.
Solana Tool Suite
The first step in creating a functional Solana developer ecosystem, is to install and become familiar with the Solana tool suite, a strict prerequisite for many Solana developer tools like Anchor.
Solana Tool Suite Setup
In order to set up the Solana Tool Suite for MacOS or Linux users, paste the following command into a terminal.
sh -c "$(curl -sSfL https://release.solana.com/v1.10.31/install)"
For Windows users, paste the following command into a terminal.
curl https://release.solana.com/v1.10.31/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs
Rust
Rust is a high-speed and stable programming language that is used to power a variety of software applications ranging from operating systems to blockchains. Specifically, the Solana blockchain is powered by the Rust programming language, necessitating its use for Solana-based blockchain development.
Rust Setup
In order to set up Rust for MacOS or Linux users, paste the following command into a terminal.
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
For Windows users, follow the detailed steps on the Rust book's installation guide.
To ensure that Rust was properly installed and to practice development in Rust, we will compose a “Hello, World” program using the Rust programming language.
First, create a folder titled, “Hello_World_Rust” and cd into the folder with the command:
cd Hello_World_Rust
Next, open the folder in preferred text editor (i.e. Visual Studio Code, Atom, etc). Once opened, create a file titled, “main.rs”
Inside “main.rs” write and save:
fn main() {
println!("Hello World");
}
In the terminal, write:
rustc main.rs
./main
These steps should produce a functioning Rust program that prints “Hello World.”
Anchor
Anchor is a Solana development framework that makes it easier to develop Solana-based programs and smart contracts. Anchor simplifies the Solana development process by providing boilerplate code and security infrastructure, allowing users to avoid dealing with the finicky inner-workings of an ordinary Solana program.
As a result, Anchor is a pivotal tool in the Solana development ecosystem.
Anchor Setup
To install Anchor, we must first install Anchor version manager (AVM). Open a terminal and paste the following command:
cargo install --git https://github.com/project-serum/anchor avm --locked --force
Next, finish installing the Anchor software with the following command:
avm install latest
avm use latest
To ensure that Anchor was properly installed, try composing an Anchor workspace using the command:
anchor init
In this folder, you will find the following main files and folders
Anchor.toml file
App folder
Programs folder
Tests folder
Migrations folder
Solana Web3.js
Web3.js for Solana is a Solana Javascript API built using the Solana JSON RPC API. Web3.js serves as an accessible interface for developers to interact with the Solana blockchain using Javascript, empowering engineers to build on the Solana blockchain.
Web3.js Setup
Installing Solana Web3.js is really easy. Go to your command line interface and run this command:
yarn add @solana/web3.js
SPL-Token
The SPL-Token package is another Javascript package that allows developers to mint, transfer, and interact with tokens native to the Solana blockchain, a necessity when developing software that requires Solana-based tokens to operate.
SPL-Token Setup
Installing the SPL-Token package is straightforward. Open your CLI environment and run this script:
yarn add @solana/spl-token
Wallet-Adapter
The Wallet-Adapter javascript package allows developers to easily integrate Solana-based wallets like Phantom and Solflare into their dApps, facilitating easy access to Solana-based funds.
Wallet-Adapter Setup
To set up the Wallet-Adapter package, run:
yarn add @solana/wallet-adapter-wallets \
@solana/wallet-adapter-base
Solana Developer Support
Learning how to develop dApps on a brand new blockchain can frustrate even seasoned developers. If you need help getting started on Solana, explore this collection of documentation, tools, and additional resources:
Solana Discord - get support from Solana devs and developer relations team members
Anchor Discord - work with builders developing dApps and maintaining the Anchor library
Solana Playground - start building on Solana directly from your browser
Alchemy Discord - our developer relations team is always ready to answer questions about Alchemy's Solana API
Solana Tutorials and Hackathons
Now that you have set up your Solana development environment, the next step in your journey as a Solana developer is to practice building with Solana's tools using online tutorials, courses, and bootcamps.
One of the best ways to master a new blockchain is to learn by building Solana projects. In addition to following self-paced tutorials to reinforce knowledge, developers can also attend Solana hackathons to meet use these essential tools in real-world projects.
Start Building on Solana
In this article, you learned about the dev tooling required to start building on the Solana blockchain. You explored how to set up your local environment, Solana tutorials, and places to get support. Last step is to sign up for a free Solana developer account on Alchemy and start building!
Related overviews
Learn About Compressed NFTs and How They Work
Learn What an Associated Token Account Is, How it Works, and How to Create One
Learn What SFTs Are, How They Work, and What Makes Them Different from NFTs and SPL Tokens