Getting Started with Solana Development | Solana (2024)

Welcome to the Solana developer docs!

This page has everything you need to know to get started with Solanadevelopment, including basic requirements, how Solana development works, and thetools you'll need to get started.

High Level Developer Overview #

Development on Solana can be broken down into two main parts:

  1. Onchain Program Development: This is where you create and deploy customprograms directly to the blockchain. Once deployed, anyone who knows how tocommunicate with them can use them. You can write these programs in Rust, C,or C++. Rust has the most support for onchain program development today.
  2. Client Development: This is where you write software (calleddecentralized applications, or dApps) that communicates with onchainprograms. Your apps can submit transactions to perform actions onchain.Client development can be written in any programming language.

The "glue" between the client side and the onchain side is theSolana JSON RPC API. The client-side sends RPCrequests to the Solana network to interact with onchain programs. This is verysimilar to normal development between a frontend and backend. The majordifference with working on Solana is that the backend is a global permissionlessblockchain. This means that anyone can interact with your onchain programwithout the need of issuing API keys or any other form of permission.

Getting Started with Solana Development | Solana (1)How clients work with the Solana blockchain

Solana development is a bit different from other blockchains because of itshighly composable onchain programs. This means you can build on top of anyprogram already deployed, and often you can do so without needing to do anycustom onchain program development. For example, if you wanted to work withtokens, you could use the Token Program that is alreadydeployed on the network. All development on your application would beclient-side in your language of choice.

Developers looking to build on Solana will find that the development stack isvery similar to any other development stack. The main difference is that you'llbe working with a blockchain and have to think about how users potentiallyinteract with your application onchain instead of just on the frontend.Developing on Solana still has CI/CD pipelines, testing, debugging tools, afrontend and backend, and anything you'd find in a normal development flow.

What You'll Need Get Started #

To get started with Solana development, you'll need different tools based onwhether you are developing for client-side, onchain programs, or both.

Client-side Development #

If you're developing onchain apps, you should know Rust.

If you're developing on the client-side, you can work with any programminglanguage you're comfortable with. Solana has community-contributed SDKs to helpdevelopers interact with the Solana network in most popular languages :

LanguageSDK
RUSTsolana_sdk
Typescript@solana/web3.js
Pythonsolders
Javasolanaj
C++solcpp
Gosolana-go
KotlinsolanaKT
Dartsolana

You'll also need a connection with an RPC to interact with the network. You caneither work with a RPC infrastructure provider orrun your own RPC node.

To quickly get started with a front-end for your application, you can generate acustomizable Solana scaffold by typing the following into your CLI:

npx create-solana-dapp <project-name>

This will create a new project with all the necessary files and basicconfiguration to get started building on Solana. The scaffold will include bothan example frontend and an onchain program template (if you selected one). Youcan read thecreate-solana-dapp docsto learn more.

Onchain Program Development #

Onchain program development consists of either writing programs in Rust, C, orC++. First you'll need to make sure you have Rust installed on your machine. Youcan do this with the following command:

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

You'll then need to have the Solana CLI installedto compile and deploy your programs. You can install the Solana CLI by runningthe following command:

sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"

Using the Solana CLI, it is recommended to run a local validator for testingyour program. To run a local validator after installing the Solana CLI, run thefollowing command:

solana-test-validator

This will start a local validator on your machine that you can use to test yourprograms. You canread more about local development in this guide.

When building onchain programs, you have a choice to either build with nativeRust (ie, without a framework) or use the Anchor framework. Anchor is aframework that makes it easier to build on Solana by providing a higher-levelAPI for developers. Think of Anchor like building with React for your websitesinstead of raw Javascript and HTML. While Javascript and HTML give you morecontrol over your website, React accelerates your development and makesdeveloping easy. You can read more about Anchoron their website.

You'll need a way to test your program. There are a few different ways to testyour program based on your language preference:

If you do not want to develop your programs locally, there's also theonline IDE Solana Playground. Solana Playground allowsyou to write, test, and deploy programs on Solana. You can get started withSolana Playground byfollowing our guide.

Developer Environments #

Choosing the right environment based on your work is very important. On Solana,there are a few different network environments (called clusters) to facilitatemature testing and CI/CD practices:

  • Mainnet Beta: The production network where all the action happens.Transactions cost real money here.
  • Devnet: The quality assurance network where you deploy your programs totest before deploying to production. Think "staging environment".
  • Local: The local network that you run on your machine usingsolana-test-validator to test your programs. This should be your firstchoice when developing programs.

Build by Example #

While you get started building on Solana, there's a few more resources availableto help accelerate your journey:

  • Solana Cookbook: A collection ofreferences and code snippets to help you build on Solana.
  • Solana Program Examples:A repository of example programs providing building blocks for differentactions on your programs.
  • Guides: Tutorials and guides to walkyou through building on Solana.

Getting Support #

The best support you can find is onSolana StackExchange. Search for yourquestion there first - there's a good chance there will already be a questionasked by someone else, with an answer. If it's not there, add a new question!Remember to include as much detail as you can in your question, and please usetext (not screenshots) to show error messages, so other people with the sameproblem can find your question!

Next steps #

You're now ready to get started building on Solana!

  • Deploy your first Solana program in the browser
  • Get started building programs locally with Rust
  • Overview of writing Solana programs
Getting Started with Solana Development | Solana (2024)
Top Articles
How hedge and private equity fund owners can structure employee compensation to keep their superstars
5 Powerful Breakthrough Prayers for Finances
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Umn Biology
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 6409

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.