Roms1383 / test-rkyv

test how to work with rkyv and appended meta

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test rkyv

why ?

I was curious to see if rkyv can produce sort of a zip annotated with metadata.

image

going further

Currently the metadata and internal .zip are serialized / deserialized manually, allowing:

  • ✅ zero-copy deserialization
  • ✅ preserve internal zip

Experiments with current rkyv 0.7.42 helpers:

  • ❌ if Vec<u8> is defined in struct, then it's somehow loaded, slowing everything down (even when removing validation).
  • ❌ using #[With(Raw)] allows for expected efficient loading, but it serialize/deserialize the internal .zip as a pointer (pointing to nothing).

A potential idiomatic solution would be to implement a custom #[With(Blob)] to handle this specific use-case.

usage

Please place some archive.zip at the root of the repo to test it out (the bigger the .zip the better). Then, if you have Just installed, run the alias:

just t

otherwise just run:

cargo t -- --test-threads 1 --nocapture

About

test how to work with rkyv and appended meta


Languages

Language:Rust 97.8%Language:Just 2.2%