AcademyRulesDevelopment

Rust and Solana Anchor rules

Blockchain development teams building Solana programs who want Cursor to follow Anchor conventions.

  • Recommendedour rating
  • 40,892repository stars
  • CC0-1.0licence
  • 4 months agolast update
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/rust.mdc -o .cursor/rules/rust.mdc
rust.mdc

Loading the file...

What it does

A Cursor rules file for writing Solana programs in Rust with the Anchor framework. It covers program structure, account constraints, state definitions, Borsh serialization, avoiding floating point types and writing TypeScript tests that run against a local validator.

Use cases

  1. 01Organise instruction handlers into modules
  2. 02Validate accounts with Anchor constraint macros
  3. 03Write Mocha tests for a Solana program

Questions about
Rust and Solana Anchor rules.

What is Rust and Solana Anchor rules used for?

Blockchain development teams building Solana programs who want Cursor to follow Anchor conventions. A Cursor rules file for writing Solana programs in Rust with the Anchor framework. It covers program structure, account constraints, state definitions, Borsh serialization, avoiding floating point types and writing TypeScript tests that run against a local validator.

How do I install Rust and Solana Anchor rules?

Run this in your terminal: mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/rust.mdc -o .cursor/rules/rust.mdc

Is Rust and Solana Anchor rules open source?

Yes. The code is on GitHub (PatrickJS/awesome-cursorrules) under the CC0-1.0 licence.

Is Rust and Solana Anchor rules safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.