Anchor: the nightly install, the fourteen crate publishes, and the two Solana cohorts
⚓ Solana Program Framework
At a glance
- What is it?
- Anchor is the Rust and TypeScript framework for Solana programs, with an IDL at the centre and five published packages around it. The recommended install tracks nightly builds, the release target publishes fourteen crates in order, and the workspace version, 1.2.2, matches the latest release tag.
- Who is it for?
- Anchor fits teams writing Solana programs who want the IDL to drive both a Rust and a TypeScript client, and who accept a toolchain that changes on its own. Turn nightly off with `avm nightly --disable` before pinning a release or building in CI, and note that the workspace version, 1.2.2, matches the latest v1.2.2 release tag.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 21, 2026, and from our analysis. They are not legal advice.
Star history
- otter-sec/anchor5,178 ★ · +44
| Repository | 2026-09-23 | 2026-11-21 |
|---|---|---|
| otter-sec/anchor | 5.1k | 5.2k |
44 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The recommended install pipes a script into sh and links into your cargo bin
The documented way to get the CLI is a shell script piped straight into `sh`, which runs without asking anything first:
curl -sSfL https://raw.githubusercontent.com/otter-sec/anchor/master/avm/install | shThat line installs the Anchor Version Manager, downloads the latest nightly AVM and Anchor CLI binaries, enables the nightly channel, and links the `avm` and `anchor` commands into `~/.cargo/bin` when possible. Two details matter more than the one-liner suggests. The qualifier when possible means the link step is not guaranteed, and the README does not say what happens when it is skipped. And the URL points at the `master` branch rather than a tag, so the installer you run is whatever that file has become, with no version named in the command.
Nightly is the default state, and one flag turns it off
Once installed, `anchor` uses the latest cached nightly build and periodically checks for updates. That means two developers on the same project can be running different toolchains on the same afternoon without either of them changing anything. Two AVM subcommands control the state, and the first is the documented path if you already have AVM and only need the nightly channel:
avm nightlyThe second returns to normal AVM version resolution:
avm nightly --disableRun that second one before a release or inside a CI job, where a toolchain that moves on its own is a liability rather than a feature. Neither subcommand selects a specific build, and no pinning command appears in the documentation here, so reproducible environments mean disabling nightly and managing the version yourself.
The publish target walks fourteen crates with a wait between each
Releases run through a Makefile target that publishes the workspace leaf by leaf, in dependency order:
cd lang/syn/ && cargo publish && cd ../../
cd lang/derive/accounts/ && cargo publish && cd ../../../Every step is followed by `sleep 25`, so the target spends minutes idle between uploads. The order climbs from the leaves upward: `lang/syn`, then `lang/derive/accounts`, `lang/derive/serde` and `lang/derive/space`, then each attribute macro separately, `lang/attribute/access-control`, `account`, `constant`, `error`, `program` and `event`, and only after all of those the `lang/`, `spl/`, `client/` and `cli/` crates. The sequence exists because a publish fails while a dependency version has not appeared yet, and there is no resume logic in it. A failure halfway leaves you re-running the target by hand and skipping the ones already out.
Cargo.toml carries two Solana cohorts and a version the tags ignore
The workspace declares resolver 2 and a version that matches the latest release tag:
[workspace.package]
version = "1.2.2"
readme = "README.md"
repository = "https://github.com/otter-sec/anchor"The recent tags are v1.2.2 (2026-10-28), v1.2.1 (2026-10-06) and v0.32.2 (2026-09-14), so the workspace version tracks the newest tag. Documentation is generated with every feature turned on, since the workspace sets `all-features = true` for docs.rs and passes `--cfg docsrs` as a rustdoc argument. Members are `avm`, `cli`, `cli/cli-macros`, `client`, `idl`, `lang`, the `lang/attribute/*` and `lang/derive/*` globs, `lang/error`, `lang/syn` and `spl`, with two vendored OpenBook checkouts under `tests/` excluded from the workspace. Dependencies arrive in two curated sets chosen by the mutually exclusive `solana-v3` and `solana-v4` features, `solana-v3` being the default, and `solana-program` carries an inline instruction to keep it in sync with `cli/solana-program-version`.
make build-cli copies the binary into the npm package by hand
Building the CLI for distribution is two commands, and the second one is the interesting one:
cargo build -p anchor-cli --release
cp target/release/anchor cli/npm-package/anchorNothing publishes to npm in that target, and the root `package.json` contains a single line naming pnpm 10.28.0 as the package manager, so the npm side is assembled by hand rather than by a workspace script. `make clean` is the blunt counterpart: it locates every `.anchor`, `node_modules` and `target` directory and deletes all three, which in a checkout with vendored test dependencies under `tests/` means build output disappears along with it. Documentation checks have their own target, and `make update-dictionary` pipes cspell output through a generated intermediate file that is renamed over `.cspell-anchor-dictionary.txt`.
Fuzzing runs through Crucible and needs a harness you write
Fuzzing is reached through one subcommand that integrates Crucible for coverage-guided program fuzzing:
# scaffold a fuzz harness
anchor fuzz init program_name
# run a fuzz test
anchor fuzz run program_name test_name --releaseThe first command scaffolds, the second runs, and each test is addressed by program name and test name, so a workspace with several programs keeps a separate harness per program. The documented invocation passes `--release`. What is not written down is which programs are set up for fuzzing, what a harness is allowed to contain, or where coverage output is written. The effect for a newcomer is that fuzzing is opt-in work carried out per program, not something a fresh checkout can execute.
Five packages sit on either side of the IDL
The published set splits across two languages. `anchor-lang` holds the Rust primitives for writing programs on Solana, `anchor-spl` holds CPI clients for SPL programs, and `anchor-client` is the Rust client for Anchor programs. On the other side `@anchor-lang/core` is the TypeScript client and `@anchor-lang/cli` is the CLI that builds and manages a workspace. The IDL is the only interface described as shared, and the TypeScript client is generated from it, so a change to a program's IDL has to reach both client packages or the Rust and TypeScript sides of your app quietly disagree. The comparison drawn for people coming from Solidity, Truffle and web3.js is about that flow rather than the syntax: writing RPC request handlers, emitting an IDL and generating clients from it is the same sequence, while the DSL itself targets Solana. The example program is a counter where only the designated `authority` can increment.
Editorial conclusion
Anchor fits teams writing Solana programs who want the IDL to drive both a Rust and a TypeScript client, and who accept a toolchain that changes on its own. Turn nightly off with `avm nightly --disable` before pinning a release or building in CI, and note that the workspace version, 1.2.2, matches the latest v1.2.2 release tag.
Frequently asked questions
What is Anchor used for on Solana?
Anchor is a framework for writing Solana programs, and it covers four pieces: a Rust eDSL, an IDL specification, a TypeScript package that generates clients from that IDL, and a CLI for building and managing complete applications. The source is Apache 2.0.
How do I install the Anchor CLI?
The recommended route is the Anchor Version Manager, run as `curl -sSfL https://raw.githubusercontent.com/otter-sec/anchor/master/avm/install | sh`. It installs AVM, downloads the latest nightly AVM and Anchor CLI binaries, enables the nightly channel and links the `avm` and `anchor` commands into `~/.cargo/bin` when possible.
Can I stop Anchor from tracking nightly builds?
Yes. `avm nightly --disable` leaves nightly mode and returns to normal AVM version resolution, while `avm nightly` enables the channel directly. The install script enables nightly by default, and after that `anchor` uses the latest cached nightly build and checks for updates periodically.
How does Anchor fuzzing work?
`anchor fuzz` integrates Crucible for coverage-guided program fuzzing. Run `anchor fuzz init program_name` to scaffold a harness and `anchor fuzz run program_name test_name --release` to run a test, which addresses each test by program name and test name.
Which packages does the Anchor project publish?
Five: `anchor-lang` for Rust primitives on Solana, `anchor-spl` for CPI clients to SPL programs, `anchor-client` as the Rust client for Anchor programs, `@anchor-lang/core` as the TypeScript client, and `@anchor-lang/cli` for building and managing an Anchor workspace.
What licence covers Anchor?
Apache 2.0, with the text in the `LICENSE` file at the repository root. Contributions are taken under the same terms unless a contributor states otherwise, and the code is provided as-is without warranties or liability.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/otter-sec-anchor)Star history chart for your README
[](https://hysenlabs.com/projects/otter-sec-anchor)Was this useful?