Write Anchor.
Ship Pinocchio or Native.
Anvil parses Anchor into a typed IR and emits idiomatic Pinocchio or Native Rust — with a byte-equal gate that checks the output against the Anchor reference under LiteSVM, so you know when a port is deploy-safe.
Five stages from Anchor source to verified emit.
Paste raw source, select a GitHub repo, or upload local files. No refactoring required.
#[account]
pub struct Counter {
pub authority: Pubkey,
pub count: u64,
}Tree-sitter AST parser extracts accounts, constraints, and logic into a typed SolanaIR.
kind: state field: count: u64 field: authority: Pubkey seeds: [b"counter", auth] size: 8 + 32 + 8
Transpile the IR into idiomatic Pinocchio or Native Rust with full multi-file support.
pub fn process(
accounts: &[AccountInfo],
data: &[u8],
) -> ProgramResult {
...
}Anchor reference and Anvil emit run the same scenario in LiteSVM. Account bytes and lamport ledgers must match exactly.
Cost tables map original Anchor operations to low-level syscalls.
Byte-equal across 6 real-world programs.
Each program runs the identical scenario in LiteSVM under both the Anchor reference binary and the Anvil emit. Account bytes and lamport ledgers must match exactly — divergence fails the build.
Escrow PDA + token vault init
emit! event log byte-equal
Account init + #[max_len] strings
Multi-field state writes
PDA-as-payer create_account
Counter increment + clock read
Select a program, pick a target, compile.
All 4 demo programs are live. For full power — paste source, upload a file or folder, or point Anvil at a GitHub repo — use the Workbench.
Counter — savings per instruction
What's shipped vs what's next.
- 6 real-world programs — byte-equal against Anchor under LiteSVM
- 11 demo programs — byte-equal end-to-end via auto-scenario
- 36/36 program-examples — cargo green on both Pinocchio + Native
- AI patches gated — by byte-equal — divergent fixes auto-rejected
- Anchor 0.29–1.0 parser — Token-2022 (25 ext), InterfaceAccount runtime dispatch, zero_copy, literal discriminator override
- Multi-file output — lib.rs, state.rs, instructions/, helpers
- GitHub ingestion — paste any public repo URL and compile
- AI refinement — Sonnet 4.6 — cost-capped, validation-error gated
- 01Devnet deploy verification — live transaction round-trip on real validators
- 02Token-2022 end-to-end emission — extension-aware account layout + CPIs
- 03Corpus expansion — Squads, Streamflow, Phoenix byte-equal
- 04IDE plugin — inline CU previews on Anchor source
- 05Automated regression sweep — 50+ real-world repos on every commit