---
title: Introduction
description: Pinocchio is a zero-dependency Rust library for writing Solana programs. Learn what it is, who it is for, and when to choose it over Anchor.
url: https://pinocchio-docs.thally.app/
---

# Introduction

Pinocchio is a zero-dependency Rust library for writing Solana programs. Learn what it is, who it is for, and when to choose it over Anchor.

## What is Pinocchio?

Pinocchio is a Rust library for writing Solana programs without external dependencies. It is `no_std` and reads account data in place instead of copying it, so programs stay small and cheap to run in compute units.

You write the entrypoint, the instruction handling, and the account checks yourself. Pinocchio gives you thin building blocks and stays out of your way.

## Who it is for

- Rust developers who already understand Solana's account model
- Teams where compute-unit cost or binary size matters
- Developers who want to see and control exactly what their program does

## Pinocchio or Anchor?

The two solve different problems, so the question is which trade-off fits your program.

Choose **Pinocchio** when:

- Compute-unit cost matters, for example for a program that is called very often
- You want a minimal dependency tree: fewer crates to audit and faster compiles
- You want explicit control over how accounts are parsed and validated

Choose **Anchor** when:

- You want account validation and instruction routing generated for you
- You are new to Solana and want guardrails
- You value its tooling, such as IDL and client generation, over raw efficiency

The trade-off to understand: Pinocchio removes the framework, so the checks Anchor performs for you (owner, signer, writable, account layout) become your job. Skipping one is a classic source of Solana security bugs.

## Start here

1. [Quickstart](/quickstart): build a minimal program and run it in a local test.
2. [Troubleshoot your first build](/guides/troubleshooting): fix the errors new users actually hit.

These docs were verified with Pinocchio 0.11.2, Agave CLI 4.3.2 (`cargo-build-sbf` 4.4.0), Rust 1.97.1, and Mollusk 0.16.2.