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

Upgrade rkyv to 0.8 and remove bytecheck #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ssfdust
Copy link

@ssfdust ssfdust commented Dec 5, 2024

The rkyv 0.8 version is a major update that brings many improvements and new features. This patch adapts the API to version 0.8, removing the old API.

Additionally, the key-value type in the test cases has been changed from HashMap to BTreeMap, as the data bytes of HashMap are no longer fixed in version 0.8. I suspect this is due to the unordered sorting of HashMap.

After switching to BTreeMap, everything works fine.

The rkyv 0.8 version is a major update that brings many improvements and new
features. This patch adapts the API to version 0.8, removing the old API.

Additionally, the key-value type in the test cases has been changed from
HashMap to BTreeMap, as the data bytes of HashMap are no longer fixed in
version 0.8. I suspect this is due to the unordered sorting of HashMap.

After switching to BTreeMap, everything works fine.
@emmyoh
Copy link

emmyoh commented Dec 30, 2024

@austinhartzheim Has this PR been noticed?

@austinhartzheim
Copy link
Collaborator

Thanks for the contribution upgrading to rkyv 0.8. At Cloudflare, we have several use-cases that require rkyv 0.7, so we cannot merge the PR as it stands today. Currently, this crate is tightly coupled to a single rkyv version, and I would like to break that coupling so it can be used across multiple rkyv versions.

Short-Term Plan:
We could add a read_raw() method, similar to the existing write_raw() method. That would allow you to read and write raw bytes and use rkyv at a version of your choosing, or any other deserialization logic to operate on those raw bytes.

Can you confirm that this would unblock your use-case?

Long-Term Plan:
Eventually, I believe we could make the interface generic over other zero-copy deserialization frameworks while preserving the typed API. Potentially, we can support multiple versions of rkyv with this solution, although further work is required to determine what the interface would look like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants