Use Rust and LiteSVM for tests per new Anchor defaults, migrate from 1.0rc5 to Anchor 1.0 final by mikemaccana-edwardbot · Pull Request #555 · solana-developers/program-examples

@mikemaccana-edwardbot mikemaccana-edwardbot changed the title Migrate to Anchor 1.0, Rust LiteSVM tests, and solana-kite 0.3.0 Use Rust and LiteSVM for tests per new Anchor defaults, migrated from 1.0rc5 to Anchor 1.0 final

Apr 7, 2026

@mikemaccana-edwardbot mikemaccana-edwardbot changed the title Use Rust and LiteSVM for tests per new Anchor defaults, migrated from 1.0rc5 to Anchor 1.0 final Use Rust and LiteSVM for tests per new Anchor defaults, migrate from 1.0rc5 to Anchor 1.0 final

Apr 7, 2026

@rocketiotemp

Replaces all TypeScript Anchor tests with Rust LiteSVM tests powered by
solana-kite (https://crates.io/crates/solana-kite). Kite consolidates
repeated test boilerplate — account creation, token minting, PDA derivation,
balance assertions — into reusable functions. The result: 46 Rust test files
averaging just 148 lines each, replacing ~13,700 lines of TypeScript tests
and 109 per-project config files (package.json, tsconfig, pnpm-lock.yaml).
No more per-project npm dependencies for Anchor tests.

### Anchor 1.0.0 (stable)
- Migrate all 49 Anchor programs from 0.32.1 → 1.0.0 (stable, released 2026-04-02)
- @coral-xyz/anchor → @anchor-lang/core in TypeScript
- CpiContext::new() .to_account_info() → .key() in Rust
- Transfer-hook: .map_err() wrappers for SPL 2.x→3.x ProgramError bridge
- transfer-cost: upgraded SPL crates to Solana 3.x, Box<InterfaceAccount> for stack overflow
- Compression: replaced mpl-bubblegum CPI with raw invoke() (no Solana 3.x release)

### Rust LiteSVM tests with solana-kite 0.3.0
- 46 Anchor programs now have Rust integration tests (~6,800 lines total)
- solana-kite replaces hundreds of lines of duplicated setup code per test:
  create_funded_keypair, create_token_mint, mint_tokens_to_token_account,
  get_pda, get_token_balance — all one-liners instead of 20+ line helpers
- Eliminates 109 per-project boilerplate files (package.json, tsconfig, pnpm-lock)
- Net deletion: ~6,900 lines of TypeScript test code removed

### Repo cleanup
- Configure biome, fix all lint errors
- Remove yarn.lock (project uses pnpm)
- Add pnpm/action-setup to CI workflows
- Upgrade litesvm from 0.8.1 to 0.11.0
- Use 🤥 emoji for Pinocchio (lying face / growing nose)

691 files changed, +21,837 / -17,091