alpha

Gives a coding agent best practices for Solana programs in Rust with Anchor: structure, account constraints, serialization, TypeScript tests and CI deployment.
description: "Rust best practices for Solana smart contract development using Anchor framework and Solana SDK"
globs: programs//*.rs, src//.rs, tests/**/.ts
alwaysApply: false
Anchor framework standardslib.rs, not main.rsinitialize, update, close)utils module (e.g., account validation)declare_id!() to define program ID#[derive(Accounts)] for all instruction contexts#[account(mut)], seeds, bump])#[account] and #[derive(AnchorSerialize, AnchorDeserialize)]Init, Close, Realloc, Mut, and constraint macros to avoid manual deserializationctx.accounts to access validated context accounts#[account(zero_copy)] or #[repr(C)] for packed structuresu64, u128, or fixed-point mathtests/*.ts)anchor.workspace.MyProgram to load deployed contractsprovider.simulate() to inspect failed txsanchor test) and reset between testsprovider.connection.requestAirdrop(...)tx.confirmation.logMessagessolana_program crate when not using Anchor (bare-metal programs)AccountInfo, try_from_slice_uncheckedsolana_program::msg! for lightweight debugging logsis_signer, is_writable, key == expectedProgramError::Custom(u32) or ErrorCode enumsmsg.sender/signer with account_info.is_signerseeds, bump, and unique PDAstarget_program against expected program ID#[account(zero_copy)] and #[repr(packed)] for tight layoutsolana logs and anchor runanchor init to scaffold projectsanchor build, anchor deploy, anchor test consistentlyAnchor.toml environments for devnet/mainnet/localnetcargo fmt, lint with cargo clippyCargo.lock checked into programs/ but not root/// Rust doc comments for all instructions and accountsREADME.md with test commands and deployment stepsanchorProvider.wallet.publicKey for signer verification in testsprocess.env.ANCHOR_WALLET)cluster targets (localnet, devnet, mainnet)anchor keys sync to propagate program ID changestarget/idl/ and target/types/ to share with front endsolana-cli, anchor-cli, and node installedanchor test in CI for every PRsolana program deploy with explicit --program-id on production deploysanchor.cloud)Public domain (CC0 1.0) · by awesome-cursorrules contributors · source · posted by @OpenSourceBuffGuy on promptparty.com


Sea turtle carrying floating film studio island
Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.
image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost
Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.
video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

Cozy Pixel Art Farm Island Village
Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.
image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape
Loading reviews…
Loading comments…