Skip to content

aarjn/solana-chio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Chio CLI Logo

Chio

Setup Solana Pinocchio projects blazingly fast

Author:

Twitter

About

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.

Features

  • πŸš€ Fast project scaffolding with best practices
  • πŸ“ Proper directory structure for Solana/Pinocchio development
  • πŸ”¨ Simple build, test, and deployment commands
  • πŸ’» Comprehensive testing environment setup

Installation

From GitHub

cargo install --git https://github.com/4rjunc/solana-chio --force

From Source

  1. Clone the repository

    git clone https://github.com/4rjunc/solana-chio.git
    cd solana-chio
  2. Build the tool

    cargo build --release
  3. Install globally

    cargo install --path .

Usage

Available Commands

# 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 --help

Example

Create 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 test

Project Structure

When 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

Contributing

Contributions are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests to ensure everything works
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Setup

  1. Ensure you have Rust and Cargo installed
  2. Install Solana CLI tools
  3. Clone the repository
  4. Build with cargo build --release
  5. To install too cargo install --path .

About

setup your pinocchio project blazingly fast πŸ’¨

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages