Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document compatibility of archived data across versions #477

Open
janrueth opened this issue Feb 26, 2024 · 2 comments
Open

Document compatibility of archived data across versions #477

janrueth opened this issue Feb 26, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@janrueth
Copy link

First of all, thanks for this awesome crate.

I do wonder, and I could not find an issue or anything in the book, what expectations should one have in regard to the compatibility of the rkyv'ed-serialized data across different rkyv versions.

Say I've serialized something with rkyv 0.7.43. Are there guarantees that (assuming strict layout and no changes to the types):

  • I can deserialize it with rkyv 0.6.x (minor older version)?
  • I can deserialize it with rkyv 0.7.42 (patch older version)?
  • I can deserialize it with rkyv 0.7.44 (patch newer version)?
  • I can deserialize it with rkyv 0.8.x (minor newer version)?
  • I can deserialize it with rkyv 1.x.x (major newer version)?
  • Should I assume no change in the serialized bytes between different versions?

The question is essentially motivated by how I need to manage the storage of rkyv'ed data (do I need to/should I refresh serialized data) and how I need to manage rollout of rkyv updates to different components of a system.

Thanks in advance!

@Alxandr
Copy link
Contributor

Alxandr commented Mar 8, 2024

You should definitely expect changes in the serialized bytes between different major versions I would think. Pre 1.0.0, I would also assume breaking changes in minor versions. Note; I'm not speaking authoritatively - but anything else would put a hard limit on modifications to the library. I'm fairly certain that 0.8 is already introducing some breaking changes to the serialization format.

The thing you have to realize with zero-copy serialization like rkyv is that what's basically contained in the binary data you get from serialization is just rust structures being transmuted to a byte array. It's less like a serialization format, and more like a ABI really - without the function calls being defined as far as I know.

@djkoloski djkoloski changed the title Expectations of rkyv'ed data across rkyv versions Document compatibility of archived data across versions Mar 9, 2024
@djkoloski djkoloski added this to the v0.8 milestone Mar 9, 2024
@janrueth
Copy link
Author

Yeah, this is what I had expected somehow. I think it would be valuable to somehow flag incompatibilities between versions in the release notes (and generally document what to expect).

@djkoloski djkoloski added the documentation Improvements or additions to documentation label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants