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

Use checked rkyv::access #1737

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Use checked rkyv::access #1737

wants to merge 17 commits into from

Conversation

eightfilms
Copy link
Contributor

@eightfilms eightfilms commented May 27, 2024

Closes #1680

This requires us to enable the bytecheck features of rkyv and makes
use of the CheckBytes trait to do byte validation when dealing with
rkyv types.

In future, if we wish to bring back the unsafe API for those who want performance,
we could feature gate that in our sdk.

@matthiasgoergens matthiasgoergens changed the title init Use checked rkyv::access May 27, 2024
This requires us to enable the `bytecheck` features of `rkyv` and makes
use of the `CheckBytes` trait to do byte validation when dealing with
`rkyv` types.

In future, if we wish to bring back the unsafe API for those who want performance,
we could feature gate that in our sdk.
matthiasgoergens added a commit that referenced this pull request May 30, 2024
We want to move from `rkyv::access_unchecked` to checked `rkyv::access`.

We are trying to make that work in
#1737, but it turns out to be
non-trivial.

Here's some prep work: introduce byte-check and derive Debug for a few
of our sdk types.
@matthiasgoergens matthiasgoergens marked this pull request as ready for review June 4, 2024 07:06
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.

sdk: replace usage of rkyv::access_unchecked with checked access
2 participants