> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Anchor framework

> Anchor is a Rust framework for writing, testing, deploying, and calling Solana programs. What it does for you, and where to learn it.

[Anchor](https://www.anchor-lang.com/docs) is a Rust framework that simplifies
writing, testing, deploying, and interacting with Solana
<span className="sol-chip" data-concept="program"><Tooltip headline="Programs" tip="Programs are code deployed to the network that owns and updates accounts. Most apps call existing programs, such as the Token program, rather than writing their own." cta="Learn more" href="/developers/docs/core/programs">programs</Tooltip><span className="nojs-only"> ([Programs](/developers/docs/core/programs): Programs are code deployed to the network that owns and updates accounts. Most apps call existing programs, such as the Token program, rather than writing their own.)</span>.</span> The first-program tutorial in these docs uses it.

## What Anchor does for you

- **Account validation.** You declare the
  <span className="sol-chip" data-concept="account"><Tooltip headline="Accounts" tip="Everything on Solana (balances, tokens, programs, app data) lives in accounts: records at an address, each with an owner that is allowed to change it." cta="Learn more" href="/developers/docs/core/accounts">accounts</Tooltip><span className="nojs-only"> ([Accounts](/developers/docs/core/accounts): Everything on Solana (balances, tokens, programs, app data) lives in accounts: records at an address, each with an owner that is allowed to change it.)</span></span> each
  instruction expects, with constraints such as owner, signer, and
  <span className="sol-chip" data-concept="pda"><Tooltip headline="Program-derived addresses" tip="A PDA is an address derived from a program plus some seeds. It has no private key, so only that program can sign for it, which makes it handy for storing app state at predictable addresses." cta="Learn more" href="/developers/docs/core/pda">PDA</Tooltip><span className="nojs-only"> ([Program-derived addresses](/developers/docs/core/pda): A PDA is an address derived from a program plus some seeds. It has no private key, so only that program can sign for it, which makes it handy for storing app state at predictable addresses.)</span></span> seeds, and Anchor
  checks them before your code runs.
- **Serialization.** Instruction arguments and account data are encoded and
  decoded for you.
- **An IDL.** Anchor generates an
  [IDL](/developers/docs/programs/idls), a JSON description of your program's interface.
  Clients and tools such as [Codama](/developers/docs/programs/codama/clients) use it to
  generate typed clients.
- **A CLI and project template.** `anchor init`, `anchor build`, `anchor test`,
  and `anchor program deploy` cover the whole loop. A new project includes a Rust test
  template that uses [LiteSVM](/developers/docs/tools/litesvm).

<Security title="What Anchor does not check for you">
  Anchor validates what you declare, and nothing else:

  - **`UncheckedAccount` and `AccountInfo`** skip owner, type, and signer
    checks. Anchor requires a `/// CHECK:` comment on each one; that comment
    should name the check your instruction performs instead.
  - **Relationships between accounts** need constraints. `Account<'info, Vault>`
    proves the account is a `Vault`, not that it is *this user's* vault. Add
    `has_one = owner`, `seeds`, or a `constraint` to bind it.
  - **`init_if_needed`** runs your instruction on an account that may already
    exist. Check its state so a caller can't reset an initialized account.
  - **Arithmetic** wraps in release builds unless `overflow-checks = true` is
    set in the workspace `Cargo.toml`. New Anchor projects set it; keep it.
</Security>

## Get started

<Columns cols={2}>
<Card title="Build your first program" icon="rocket" href="/developers/docs/programs/build-first-program">
Create, build, and test an Anchor program, then read every file it contains.
</Card>
<Card title="Install Anchor" icon="download" href="/developers/docs/quickstart">
Install Rust, the Solana CLI, and Anchor with one command.
</Card>
<Card title="Anchor CLI basics" icon="terminal" href="/developers/docs/intro/installation/anchor-cli-basics">
Create, build, test, and deploy Anchor projects.
</Card>
<Card title="Anchor events" icon="radio" href="/developers/docs/programs/anchor-events">
Define, emit, decode, and subscribe to typed program events.
</Card>
</Columns>

The full framework reference, including account constraints and the
`anchor` CLI, is in the [Anchor documentation](https://www.anchor-lang.com/docs).

Prefer to work without a framework? See [Rust programs](/developers/docs/programs/rust).
