{"id":26881472,"url":"https://github.com/solana-foundation/anchor","last_synced_at":"2026-02-13T20:15:30.590Z","repository":{"id":36982604,"uuid":"325891672","full_name":"solana-foundation/anchor","owner":"solana-foundation","description":"⚓ Solana Sealevel Framework","archived":false,"fork":false,"pushed_at":"2025-05-01T01:49:48.000Z","size":45419,"stargazers_count":4274,"open_issues_count":515,"forks_count":1538,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-08T19:17:45.119Z","etag":null,"topics":["blockchain","coral","rust","smart-contracts","solana"],"latest_commit_sha":null,"homepage":"https://anchor-lang.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solana-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-01T00:03:10.000Z","updated_at":"2025-05-07T17:49:54.000Z","dependencies_parsed_at":"2023-01-17T11:47:12.788Z","dependency_job_id":"448f38ea-450d-4846-903e-44e4b6539153","html_url":"https://github.com/solana-foundation/anchor","commit_stats":{"total_commits":1560,"total_committers":296,"mean_commits":5.27027027027027,"dds":0.7243589743589743,"last_synced_commit":"ebbad72fc431fb726004d68c56270e88c869428d"},"previous_names":["project-serum/anchor","solana-foundation/anchor","coral-xyz/anchor"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-foundation%2Fanchor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-foundation%2Fanchor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-foundation%2Fanchor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-foundation%2Fanchor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solana-foundation","download_url":"https://codeload.github.com/solana-foundation/anchor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969248,"owners_count":21992263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","coral","rust","smart-contracts","solana"],"created_at":"2025-03-31T15:01:14.131Z","updated_at":"2026-02-13T20:15:30.582Z","avatar_url":"https://github.com/solana-foundation.png","language":"Rust","funding_links":[],"categories":["Recently Updated","Applications","Uncategorized","Rust","Developer Resources","Frameworks","Solana Agent Infrastructure"],"sub_categories":["[Apr 08, 2025](/content/2025/04/08/README.md)","Blockchain","Uncategorized","Anchor Development","Testing Environment","Benchmark Reality Check (real-world tool use)"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg height=\"170x\" src=\"https://pbs.twimg.com/media/FVUVaO9XEAAulvK?format=png\u0026name=small\" /\u003e\n\n  \u003ch1\u003eAnchor\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eSolana Program Framework\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/coral-xyz/anchor/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/coral-xyz/anchor/actions/workflows/tests.yaml/badge.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://anchor-lang.com\"\u003e\u003cimg alt=\"Tutorials\" src=\"https://img.shields.io/badge/docs-tutorials-blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://discord.gg/NHHGSXAnXk\"\u003e\u003cimg alt=\"Discord Chat\" src=\"https://img.shields.io/discord/889577356681945098?color=blueviolet\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/coral-xyz/anchor?color=blueviolet\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n[Anchor](https://www.anchor-lang.com/) is a framework providing several convenient developer tools for writing Solana programs (sometimes called 'smart contracts').\n\n- Rust eDSL for writing Solana programs\n- [IDL](https://en.wikipedia.org/wiki/Interface_description_language) specification\n- TypeScript package for generating clients from IDL\n- CLI and workspace management for developing complete applications\n\nAnchor is the most popular framework for Solana programs.\n\n\u003e [!NOTE]\n\u003e If you're familiar with developing in Ethereum's [Solidity](https://docs.soliditylang.org/en/), [Truffle](https://www.trufflesuite.com/), [web3.js](https://github.com/ethereum/web3.js), then using Anchor will be familiar. Although the DSL syntax and semantics are targeted at Solana, the high level flow of writing RPC request handlers, emitting an IDL, and generating clients from IDL is the same.\n\n## Getting Started\n\nFor a quickstart guide and in depth tutorials, see the [Anchor book](https://book.anchor-lang.com) and the [Anchor documentation](https://anchor-lang.com).\n\nTo jump straight to examples, go [here](https://github.com/coral-xyz/anchor/tree/master/examples). For the latest Rust and TypeScript API documentation, see [docs.rs](https://docs.rs/anchor-lang) and the [typedoc](https://www.anchor-lang.com/docs/clients/typescript).\n\n## Packages\n\n| Package                 | Description                                              | Version                                                                                                                          | Docs                                                                                                            |\n| :---------------------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- |\n| `anchor-lang`           | Rust primitives for writing programs on Solana           | [![Crates.io](https://img.shields.io/crates/v/anchor-lang?color=blue)](https://crates.io/crates/anchor-lang)                     | [![Docs.rs](https://docs.rs/anchor-lang/badge.svg)](https://docs.rs/anchor-lang)                                |\n| `anchor-spl`            | CPI clients for SPL programs on Solana                   | [![crates](https://img.shields.io/crates/v/anchor-spl?color=blue)](https://crates.io/crates/anchor-spl)                          | [![Docs.rs](https://docs.rs/anchor-spl/badge.svg)](https://docs.rs/anchor-spl)                                  |\n| `anchor-client`         | Rust client for Anchor programs                          | [![crates](https://img.shields.io/crates/v/anchor-client?color=blue)](https://crates.io/crates/anchor-client)                    | [![Docs.rs](https://docs.rs/anchor-client/badge.svg)](https://docs.rs/anchor-client)                            |\n| `@anchor-lang/core`     | TypeScript client for Anchor programs                    | [![npm](https://img.shields.io/npm/v/@anchor-lang/core.svg?color=blue)](https://www.npmjs.com/package/@anchor-lang/core)         | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://coral-xyz.github.io/anchor/ts/index.html)     |\n| `@anchor-lang/cli` | CLI to support building and managing an Anchor workspace | [![npm](https://img.shields.io/npm/v/@anchor-lang/cli.svg?color=blue)](https://www.npmjs.com/package/@anchor-lang/core-cli) | [![Docs](https://img.shields.io/badge/docs-typedoc-blue)](https://www.anchor-lang.com/docs/references/cli) |\n\n## Note\n\n- **Anchor is in active development, so all APIs are subject to change.**\n- **This code is unaudited. Use at your own risk.**\n\n## Examples\n\nHere's a counter program, where only the designated `authority`\ncan increment the count.\n\n```rust\nuse anchor_lang::prelude::*;\n\ndeclare_id!(\"Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS\");\n\n#[program]\nmod counter {\n    use super::*;\n\n    pub fn initialize(ctx: Context\u003cInitialize\u003e, start: u64) -\u003e Result\u003c()\u003e {\n        let counter = \u0026mut ctx.accounts.counter;\n        counter.authority = *ctx.accounts.authority.key;\n        counter.count = start;\n        Ok(())\n    }\n\n    pub fn increment(ctx: Context\u003cIncrement\u003e) -\u003e Result\u003c()\u003e {\n        let counter = \u0026mut ctx.accounts.counter;\n        counter.count += 1;\n        Ok(())\n    }\n}\n\n#[derive(Accounts)]\npub struct Initialize\u003c'info\u003e {\n    #[account(init, payer = authority, space = 48)]\n    pub counter: Account\u003c'info, Counter\u003e,\n    pub authority: Signer\u003c'info\u003e,\n    pub system_program: Program\u003c'info, System\u003e,\n}\n\n#[derive(Accounts)]\npub struct Increment\u003c'info\u003e {\n    #[account(mut, has_one = authority)]\n    pub counter: Account\u003c'info, Counter\u003e,\n    pub authority: Signer\u003c'info\u003e,\n}\n\n#[account]\npub struct Counter {\n    pub authority: Pubkey,\n    pub count: u64,\n}\n```\n\nFor more, see the [examples](https://github.com/coral-xyz/anchor/tree/master/examples)\nand [tests](https://github.com/coral-xyz/anchor/tree/master/tests) directories.\n\n## License\n\nAnchor is licensed under [Apache 2.0](./LICENSE).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in Anchor by you, as defined in the Apache-2.0 license, shall be\nlicensed as above, without any additional terms or conditions.\n\n## Contribution\n\nThank you for your interest in contributing to Anchor!\nPlease see the [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how.\n\n### Thanks ❤️\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/coral-xyz/anchor/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=coral-xyz/anchor\" width=\"100%\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-foundation%2Fanchor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolana-foundation%2Fanchor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-foundation%2Fanchor/lists"}