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

rkyv serialization doesn't work on Tree #73

Closed
ureeves opened this issue Sep 28, 2023 · 0 comments · Fixed by #78
Closed

rkyv serialization doesn't work on Tree #73

ureeves opened this issue Sep 28, 2023 · 0 comments · Fixed by #78
Labels
fix:bug Something isn't working

Comments

@ureeves
Copy link
Member

ureeves commented Sep 28, 2023

Describe the bug
Serializing a Tree using rkyv is currently impossible.

To Reproduce

let tree = Tree::new();
const SCRATCH_SIZE: usize = 256;
rkyv::to_bytes<_, SCRATCH_SIZE>(&tree); // This will fail to compile

Expected behaviour
The above should compile.

Additional context
This is due to the fact that rkyv does not support RefCell currently.

@ureeves ureeves added the fix:bug Something isn't working label Sep 28, 2023
ureeves pushed a commit that referenced this issue Oct 25, 2023
This is achieved by custom implementations of `Archive`, `Serialize` and
`Deserialize` for the `Node` struct, avoiding the internal `RefCell`.

Resolves #73
@ureeves ureeves mentioned this issue Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant