Introduction
Pina is a Solana program framework built on pinocchio. Programs written with it deploy with the smallest binaries of any Solana framework, spend compute like hand-written code, and evolve through managed ABI migrations. Every on-chain crate is no_std and allocation-free.
This book is the documentation home for the project. It explains the ideas behind the framework, walks through building and shipping a program, and records the trade-offs the codebase is built on. API reference lives on docs.rs.
Pina is unaudited and still hardening. Read the security model and the production-readiness gate before you deploy a program that holds value.
Where to start
- New to Pina? Follow Getting Started, then build your first program end to end.
- Coming from Anchor? Migrating from Anchor maps each Anchor concept to its Pina equivalent.
- Evaluating frameworks? The framework comparison measures size and compute units for the same programs written in five frameworks.
- Shipping an upgrade? How ABI migrations flow covers version envelopes, transitions, and the publication ledger.
What this book covers
- Start here: the project goals, toolchain setup, tutorials, and the annotated examples.
- Framework: core concepts (
#[account],#[instruction],#[derive(Accounts)], discriminators, and validation chains), declarative validation, crate features, and the Codama workflow for generated clients. - Tooling: the complete CLI reference, including automation-safe output contracts, and the packaged agent skill.
- ABI migrations: how account and instruction schemas evolve without breaking deployed programs, and a migration guide for every breaking release.
- Performance: compute-unit and program-size guidance, backed by the benchmarks in CI.
- Security: the security model, the PinaPod safety boundary, and the security lints that check program source.
- Project: architecture decision records, the development workflow, and CI and releases.