light-zero-copy

Crates.iolight-zero-copy
lib.rslight-zero-copy
version0.2.0
sourcesrc
created_at2025-05-11 21:57:31.144479+00
updated_at2025-05-15 05:06:28.828758+00
descriptionZero copy vector and utils for Solana programs.
homepage
repositoryhttps://github.com/Lightprotocol/light-protocol
max_upload_size
id1669793
size133,428
(ananas-block)

documentation

README

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
Commit count: 1991

cargo fmt