Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 2 additions & 4 deletions benches/synchronizer.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use std::time::Duration;

use bytecheck::CheckBytes;
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
use pprof::criterion::PProfProfiler;
use rkyv::{AlignedVec, Archive, Deserialize, Serialize};
use rkyv::{util::AlignedVec, Archive, Deserialize, Serialize, rancor::Error as RkyvErr};
#[cfg(unix)]
use wyhash::WyHash;

Expand All @@ -12,7 +11,6 @@ use mmap_sync::locks::{LockDisabled, SingleWriter};
use mmap_sync::synchronizer::Synchronizer;
/// Example data-structure shared between writer and reader(s)
#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
#[archive_attr(derive(CheckBytes))]
pub struct HelloWorld {
pub version: u32,
pub messages: Vec<String>,
Expand All @@ -23,7 +21,7 @@ fn build_mock_data() -> (HelloWorld, AlignedVec) {
version: 7,
messages: vec!["Hello".to_string(), "World".to_string(), "!".to_string()],
};
let bytes = rkyv::to_bytes::<HelloWorld, 1024>(&data).unwrap();
let bytes = rkyv::to_bytes::<RkyvErr>(&data).unwrap();

(data, bytes)
}
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