pinoc-0.1.7 is not a library.
Built by:
๐ What is Pinoc?
A modern Rust CLI to bootstrap Solana Pinocchio programs with built-in build, deploy, and testing tools.
Why Pinoc?
- Zero Configuration: Get started in seconds with sensible defaults
- Best Practices: Project structure follows Solana development conventions
- Developer Experience: Intuitive commands that feel natural
- Production Ready: Built-in testing, deployment, and key management
โจ Key Features
- ๐๏ธ Instant Project Scaffolding - Create production-ready projects in seconds
- ๐ Optimized Structure - Best-practice directory layout out of the box
- ๐จ Unified Commands - Build, test, and deploy with simple commands
- ๐งน Smart Cleaning - Clean build artifacts while preserving keypairs
- ๐ฆ Package Discovery - Find and add Pinocchio packages effortlessly
- ๐งช Built-in Testing - Comprehensive testing with mollusk-svm
- ๐ Keypair Management - Automatic generation and secure storage
- ๐ Program ID Sync - Keep your program IDs consistent automatically
- โ๏ธ Configuration Management - Simple deployment configuration with Pinoc.toml
๐ฆ Installation
Quick Install (Recommended)
Alternative Methods
๐ฏ Quick Start
# Install pinoc
# Create a new project
# Navigate to your project
# Build and test
# Deploy to Solana
That's it! You now have a fully functional Solana program ready for development.
๐ Command Reference
| Command | Description | Example |
|---|---|---|
pinoc init <name> |
Create a new project | pinoc init my_app |
pinoc build |
Build your program | pinoc build |
pinoc test |
Run tests | pinoc test |
pinoc deploy |
Deploy to Solana | pinoc deploy --cluster devnet |
pinoc clean |
Clean build artifacts | pinoc clean |
pinoc add <package> |
Add a package | pinoc add some_package |
pinoc search [query] |
Search packages | pinoc search database |
pinoc keys list |
List program keypairs | pinoc keys list |
pinoc keys sync |
Sync program IDs | pinoc keys sync |
pinoc help |
Show help | pinoc help |
Command Options
pinoc init <name> --no-git- Skip git initializationpinoc init <name> --no-boilerplate- Create minimal project structurepinoc clean --no-preserve- Clean everything including keypairspinoc deploy --cluster <cluster> --wallet <path>- Override deployment settings
๐ Project Structure
Standard Project
my_project/
โโโ Cargo.toml # Project configuration
โโโ README.md # Documentation
โโโ .gitignore # Git ignore rules
โโโ Pinoc.toml # Deployment configuration
โโโ src/
โ โโโ lib.rs # Main library
โ โโโ entrypoint.rs # Program entrypoint
โ โโโ errors.rs # Error definitions
โ โโโ instructions/ # Program instructions
โ โ โโโ mod.rs
โ โ โโโ initialize.rs
โ โโโ states/ # Account states
โ โโโ mod.rs
โ โโโ state.rs
โ โโโ utils.rs
โโโ tests/
โ โโโ tests.rs # Unit tests
โโโ target/deploy/
โโโ my_project-keypair.json # Program keypair
Minimal Project (--no-boilerplate)
Perfect for quick prototypes or learning:
my_minimal_project/
โโโ Cargo.toml # Minimal configuration
โโโ README.md # Basic documentation
โโโ .gitignore # Git ignore rules
โโโ Pinoc.toml # Deployment configuration
โโโ src/
โ โโโ lib.rs # Minimal program structure
โโโ target/deploy/
โโโ my_minimal_project-keypair.json
๐ง Advanced Usage
Configuration Management
Pinoc uses Pinoc.toml for deployment settings:
[]
= "localhost"
= "~/.config/solana/id.json"
Override settings per deployment:
# Deploy to devnet with custom wallet
Key Management
Keep your program IDs synchronized:
# Check key consistency
# Sync program ID in lib.rs with keypair
Example output:
โ
Program key is already consistent!
๐ Program ID: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
๐ No update needed in src/lib.rs
Smart Cleaning
Clean build artifacts while preserving important files:
# Clean target directory (preserves keypairs)
# Clean everything including keypairs
๐ Prerequisites
Ensure you have these tools installed:
- Rust (1.70+) - Install here
- Solana CLI - Install guide
- Git - For version control
๐ค Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit with clear messages (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
# Test your changes
๐ License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
๐ Support & Community
- ๐ Documentation: Pinocchio Docs
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ฆ Crates.io: pinoc