Skip to content

Commit 527ea93

Browse files
committed
Upgrade rkyv to 0.8 and remove bytecheck
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.
1 parent d2cc9fb commit 527ea93

File tree

4 files changed

+97
-136
lines changed

4 files changed

+97
-136
lines changed

Cargo.lock

Lines changed: 58 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ keywords = ["memory-mapping", "synchronization", "interprocess", "wait-free", "z
1414
categories = ["os", "filesystem", "concurrency", "data-structures", "memory-management"]
1515

1616
[dependencies]
17-
bytecheck = { version = "~0.6.8", default-features = false }
1817
memmap2 = "0.9.4"
19-
rkyv = { version = "0.7.40", features = ["validation", "strict"] }
18+
rkyv = "0.8.9"
2019
thiserror = "1.0.30"
2120
wyhash = "0.5.0"
2221

examples/common/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
use bytecheck::CheckBytes;
21
use rkyv::{Archive, Deserialize, Serialize};
32

43
/// Example data-structure shared between writer and reader(s)
54
#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
6-
#[archive_attr(derive(CheckBytes))]
5+
#[rkyv(
6+
compare(PartialEq),
7+
derive(Debug),
8+
)]
79
pub struct HelloWorld {
810
pub version: u32,
911
pub messages: Vec<String>,

0 commit comments

Comments
 (0)