Prerequisites
Before starting, make sure you have the following installed:Option A: Node.js + Yarn
- Node.js v16 or newer
- Yarn v3+
Option B (Preferred): Bun
Bun provides better performance and a simpler setup. Install it with:Required Tools
Additionally, you’ll need:- Solana CLI
- Rust + Cargo
Step 1: Clone and Install
First, clone the examples repository and install dependencies:Step 2: Navigate to Examples
Move into the examples directory where you’ll write your code:- Classic
- Kit
- Provides access to working examples (
transfer-local.ts,mint.ts, etc.) - Uses shared tooling without extra configuration
- Allows side-by-side comparison with official samples
Step 3: Start the Validator
Start a local Solana testnet for development:- Spins up a local Solana testnet
- Installs Swig programs into the testnet
- Creates a safe, reproducible environment for testing
💡 Keep the validator running in a separate terminal window. You only need to start it once per development session.
Verifying Your Setup
To verify everything is working:- Check the validator:
Common Issues
Validator Won’t Start
If the validator fails to start:- Check if another validator is running:
- Kill any existing processes:
Installation Problems
If you encounter installation issues:- Clear your package cache:
- Remove and reinstall dependencies:
Port Conflicts
If you see port conflicts:- Check which process is using the port:
- Either kill the process or configure a different port in your settings.
Development Tools
We recommend the following tools for the best development experience:Code Editor
- VS Code with extensions:
- TypeScript and JavaScript Language Features
- Solidity
- Rust
Browser Extensions
- Swig Wallet Extension (Coming Soon)
- Phantom Wallet
- Solflare Wallet
Command Line Tools
solana-clifor blockchain interactioncargofor Rust developmentbunfor running TypeScript files

