2 unstable releases

0.2.0 May 15, 2025
0.1.0 May 11, 2025

#3 in #pinocchio

Download history 285/week @ 2025-05-11 40/week @ 2025-05-18 8/week @ 2025-05-25 9/week @ 2025-06-01 232/week @ 2025-06-08 193/week @ 2025-06-15 99/week @ 2025-06-22

533 downloads per month
Used in 15 crates (8 directly)

Apache-2.0

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-program
  • anchor: Alias to solana for backward compatibility
  • pinocchio: 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