finds.dev← search

// the find

solana-foundation/program-examples

★ 1,421 · TypeScript · updated Jul 2026

A repository of Solana program examples

The official Solana Foundation example repo covering onchain program development across three frameworks: Anchor, native Rust, and Pinocchio. It is squarely aimed at developers learning to write Solana programs, with examples ranging from hello-world through PDAs, token extensions, compressed NFTs, oracles, and an AMM. Each example ships in all three framework variants wherever coverage exists.

Coverage of Token-2022 extensions is unusually thorough — transfer hooks, CPI guard, permanent delegate, interest-bearing tokens, and metadata pointer are all here with working implementations, not just stubs. The three-way framework parity (Anchor / native / Pinocchio) for most examples is genuinely useful: you can read the same concept implemented at different abstraction levels side by side, which is a better learning tool than any tutorial. CI runs scheduled against all three frameworks and uses litesvm for fast local testing, so examples are much less likely to silently rot than in typical example repos. The Pinocchio world-cup bracket game is a real, non-trivial program with a TypeScript client and webapp — it demonstrates the full stack, not just isolated snippets.

Coverage parity is incomplete in ways that will frustrate learners: CPI, repository-layout, and several token examples have no Pinocchio variant at all, while the AMM and fundraiser examples are Anchor-only with no native path. The README is a flat list with minimal explanation — each entry gets one sentence, so you have to open the code to understand what problem the example actually solves or what you're supposed to learn from it. Error handling in the native examples is barebones; most programs return `ProgramError::InvalidArgument` without teaching how to define and map custom errors, which is one of the first things a real program needs. No examples touch account versioning or upgradeable programs, which are the sharp edges where Solana bites production developers hardest.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →