Registry / other / anchor-attribute-state

anchor-attribute-state

JSON →
library0.26.0rscratesunverified

Attribute macro for defining a program state struct in Anchor Solana framework.

# Cargo.toml [dependencies] anchor-attribute-state = "0.26.0"
INSTALL
IMPORT
SIG · ANCHOR-ATTRIBUTE-S
A
anchor-attribute-state
otherrustv0.26.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

state
use anchor_attribute_state::state;

Define a Solana program state struct.

use anchor_attribute_state::state; #[state] pub struct MyState { pub counter: u64, }
Debug
Known issues
gotchaOnly works within the Anchor framework; requires Solana SDK and Anchor dependencies.
fix
Ensure anchor-lang and solana-program are in Cargo.toml.
affects: >=0.26.0
Upgrade
Version history
0.26.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Meta
2
OpenAI (training)
1
Resources
anchor-attribute-state — cargo add anchor-attribute-state · libregistry