Practical overview
When it fits
Use Shank when a Solana Rust program’s annotations need to be processed into an IDL, particularly when that IDL will feed a Solita SDK-generation workflow.
Who it is for
- Rust developers working on Solana programs who need to extract an IDL from annotated source.
- Teams that use a Solita-based process to generate program SDKs from IDL.
- Developers building Rust tooling that generates implementation blocks from annotations such as account seeds.
Documented uses
- Add Shank macro annotations to a Rust program library.
- Extract annotated program information into an IDL file with the CLI.
- Provide a Solita-compatible IDL as input to a program SDK generation stage.
- Generate Rust implementation blocks from selected annotations.
Requirements & limits
- The documented workflow starts with Rust program annotations; the CLI extracts an IDL from a specified crate.
- Shank produces the IDL, while Solita is identified as the downstream tool that uses it to generate program SDKs.
- The project is organized as Rust crates plus a CLI, rather than as a hosted application.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Shank annotations in a Rust library
Prepare a Rust program to use Shank annotations before extracting its IDL.
Before you start
- A Rust program or library to annotate.
Steps
Consult the shank-cli README for Shank usage and installation instructions.
Install and include the top-level
shankcrate in the library to add macro annotations.
Expected outcome
The library is set up to use Shank macro annotations; the CLI is the documented next stage for extracting IDL.
Guide limitations
- The main README does not provide the shank-cli installation commands or explain which annotations to add.
- This guide does not cover running the CLI or generating an SDK.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- metaplex-foundation/shank · Official homepage title · retained in its source language

