Program Development
Example Programs
Real sBPF programs to read alongside this book.
Beginner
From solana-developers/program-examples. Each lives at basics/<name>/asm/ and ships alongside Native Rust, Anchor, Steel, and Poseidon implementations of the same problem.
| Program | What it shows |
|---|---|
hello-solana | Minimum viable program; sol_log_; .rodata |
checking-accounts | Signer / writable / owner / pubkey validation |
create-account | CPI to CreateAccount, no PDA signing |
transfer-sol | CPI to System Program Transfer |
Reference
From blueshift-gg/sbpf examples/.
| Program | What it shows |
|---|---|
sbpf-asm-cpi | A CPI walkthrough with the four structures laid out explicitly |
sbpf-asm-counter | PDA + state + dispatch + account creation with PDA signing |
sbpf-asm-vault | SOL vault with PDA signing across deposit and withdraw |
sbpf-asm-escrow (community) | SPL Token CPIs, multi-PDA state machine |