2 unstable releases
0.2.0 | May 15, 2025 |
---|---|
0.1.0 | May 11, 2025 |
#3 in #pinocchio
533 downloads per month
Used in 15 crates
(8 directly)
50KB
1.5K
SLoC
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:
light-zero-copy = { version = "0.1.0", features = ["solana"] }
To use with Pinocchio:
light-zero-copy = { version = "0.1.0", features = ["pinocchio"] }
For backward compatibility with Anchor-based projects:
light-zero-copy = { version = "0.1.0", features = ["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
Dependencies
~0.8–7MB
~33K SLoC