Skip to content

Commit

Permalink
Upgrade rkyv to 0.8 and remove bytecheck
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ssfdust committed Dec 5, 2024
1 parent d2cc9fb commit 92e7675
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 135 deletions.
156 changes: 58 additions & 98 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ keywords = ["memory-mapping", "synchronization", "interprocess", "wait-free", "z
categories = ["os", "filesystem", "concurrency", "data-structures", "memory-management"]

[dependencies]
bytecheck = { version = "~0.6.8", default-features = false }
memmap2 = "0.9.4"
rkyv = { version = "0.7.40", features = ["validation", "strict"] }
rkyv = "0.8.9"
thiserror = "1.0.30"
wyhash = "0.5.0"

Expand Down
3 changes: 1 addition & 2 deletions examples/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use bytecheck::CheckBytes;
use rkyv::{Archive, Deserialize, Serialize};

/// Example data-structure shared between writer and reader(s)
#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
#[archive_attr(derive(CheckBytes))]
#[rkyv(compare(PartialEq), derive(Debug))]
pub struct HelloWorld {
pub version: u32,
pub messages: Vec<String>,
Expand Down
Loading

0 comments on commit 92e7675

Please sign in to comment.