Skip to content

v1.3.0 - Zero-Copy Serialization Support (rkyv)

Latest

Choose a tag to compare

@rpunkfu rpunkfu released this 29 Dec 07:40
· 2 commits to main since this release

About

Added zero-copy serialization support via rkyv.

Highlights

  • Zero-copy deserialization — Access archived data directly without copying
  • Full type coverage — All index types and collections support rkyv
  • Cache-aware serialization — Hot cache is correctly skipped and rebuilt on deserialize

Features

  • rkyv — Zero-copy serialization/deserialization with rkyv

Usage

[dependencies]
pgm-extra = { version = "1.2.3", features = ["rkyv"] }
let set: pgm_extra::Set<u64> = (0..1000).collect();
let bytes = rkyv::to_bytes::<rkyv::rancor::Error>(&set).expect("Unable to serialize into bytes.");
let archived = rkyv::access::<rkyv::Archived<Set<u64>>, rkyv::rancor::Error>(&bytes).expect("Unable to zero-copy deserialize.");
let restored: Set<u64> = rkyv::deserialize(archived).expect("Unable to deserialize back to original type.");

Links

License

MIT © 2025 Fox Studio (Oskar Cieslik)