Light Zero Copy
Zero copy vector and utils for Solana programs.
Features
The crate supports the following feature flags:
std
: Standard library support (default)solana
: Enable Solana program support using solana-programanchor
: Alias tosolana
for backward compatibilitypinocchio
: Enable Pinocchio framework support
Only one framework can be enabled at a time. The crate will use the appropriate imports based on the enabled feature.
Usage
To use with Solana:
= { = "0.1.0", = ["solana"] }
To use with Pinocchio:
= { = "0.1.0", = ["pinocchio"] }
For backward compatibility with Anchor-based projects:
= { = "0.1.0", = ["anchor"] }
Security Considerations
- do not use on a 32 bit target with length greater than u32
- only length until u64 is supported
Tests
cargo test --features std