Registry / serialization / rkyv
library0.8.16rscratesunverified

Zero-copy deserialization framework for Rust that enables fast serialization and deserialization without allocation.

# Cargo.toml [dependencies] rkyv = "0.8.16"
INSTALL
IMPORT
SIG · RKYV
R
rkyv
serializationrustv0.8.16
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.

Archive
use rkyv::Archive;

Serializes and deserializes a struct using zero-copy.

use rkyv::{Archive, Serialize, Deserialize}; #[derive(Archive, Serialize, Deserialize)] struct Example { value: i32, } fn main() { let example = Example { value: 42 }; let bytes = rkyv::to_bytes::<_, 256>(&example).unwrap(); let archived = rkyv::from_bytes::<Example>(&bytes).unwrap(); println!("{}", archived.value); }
Debug
Known issues
gotchaRequires the `rkyv` derive macro and careful handling of lifetimes for zero-copy references.
fix
Ensure you derive `Archive`, `Serialize`, and `Deserialize` and use `#[archive_attr]` for custom behavior.
affects: >=0.7.0
Upgrade
Version history
0.8.16latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rkyv — cargo add rkyv · libregistry