Chio is a command-line tool designed to make it easy to set up and manage Pinocchio projects on Solana. It automates common development tasks including project initialization, building, testing, and deployment with simple commands.
- π Fast project scaffolding with best practices
- π Proper directory structure for Solana/Pinocchio development
- π¨ Simple build, test, and deployment commands
- π» Comprehensive testing environment setup
cargo install --git https://github.com/4rjunc/solana-chio --force-
Clone the repository
git clone https://github.com/4rjunc/solana-chio.git cd solana-chio -
Build the tool
cargo build --release
-
Install globally
cargo install --path .
# Initialize a new project (default tests: mollusk)
chio init <project-name>
# Use LiteSVM tests instead of Mollusk
chio init <project-name> --test-framework litesvm
# Build your project
chio build
# Run tests
chio test
# Deploy your program
chio deploy
# Get help
chio --helpCreate a new Pinocchio project and get started:
# Create a new project
chio init my-pinocchio-app
# Navigate to your project
cd my-pinocchio-app
# Build your project
chio build
# Run tests
chio test
# LiteSVM example
chio init my-pinocchio-app --test-framework litesvm
cd my-pinocchio-app
chio build
chio testWhen you initialize a project with chio init, it creates the following structure:
my-project/
βββ Cargo.toml
βββ src/
β βββ lib.rs # Library crate using no_std
β βββ entrypoint.rs # Program entrypoint
β βββ errors.rs # Error definitions
β βββ instructions/ # Program instructions
β β βββ mod.rs
β β βββ deposit.rs
β β βββ withdraw.rs
β βββ states/ # Account state definitions
β βββ mod.rs
β βββ utils.rs
βββ tests/ # Test files
βββ tests.rs
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests to ensure everything works
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Ensure you have Rust and Cargo installed
- Install Solana CLI tools
- Clone the repository
- Build with
cargo build --release - To install too
cargo install --path .
