Anchor provides Rust macros, IDL generation, TypeScript clients, and CLI tooling to write and test Solana programs with less boilerplate.
Overview
Anchor is a development framework for Solana programs, often called smart contracts. It offers a Rust eDSL for on-chain logic, generates an interface description, and ships TypeScript helpers to build clients from that IDL.
A workspace-oriented CLI manages builds, tests, and deployments for full applications. Documentation covers program structure, account constraints, cross-program invocation, and client libraries in TypeScript and Rust.
Install is typically through the Anchor Version Manager, which downloads CLI binaries and coordinates versions. Included examples illustrate counters, tokens, and more complex patterns.
Fuzzing integrations and security-oriented guidance for Solana developers are also covered.
Key features
- Rust DSL for Solana program logic
- IDL generation and TypeScript clients
- CLI and workspace for builds and tests
- Account constraints and security helpers
- Cross-program invocation support
- AVM-based CLI installation
- Fuzzing integration with Crucible
Use cases
- Writing new Solana on-chain programs
- Generating typed clients from program IDLs
- Standardizing Solana project layout for teams
- Teaching Solana development with examples