mmap_sync/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! `mmap-sync` is a high-performance, concurrent data access library for Rust. It is designed to handle data access between a single writer process and multiple reader processes efficiently using memory-mapped files, wait-free synchronization, and zero-copy deserialization.
3//!
4//! ## Features
5//!
6//! - **Memory-mapped files**: This allows different processes to access the same memory space, bypassing the need for costly serialization and deserialization. As a result, `mmap-sync` provides fast, low-overhead data sharing between processes.
7//!
8//! - **Wait-free synchronization**: Inspired by [Linux kernel's Read-Copy-Update (RCU) pattern](https://www.kernel.org/doc/html/next/RCU/whatisRCU.html) and the [Left-Right concurrency control technique](https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/left-right-2014.pdf). Write access to the data is managed by a single writer, with multiple readers able to access the data concurrently.
9//!
10//! - **Zero-copy deserialization**: Leveraging the [rkyv](https://rkyv.org/) library, `mmap-sync` achieves efficient data storage and retrieval. The templated type `T` for `Synchronizer` can be any Rust struct implementing specified `rkyv` traits.
11//!
12//! To get started with `mmap-sync`, please see the [examples](https://github.com/cloudflare/mmap-sync/tree/main/examples) provided.
13mod data;
14pub mod guard;
15pub mod instance;
16pub mod locks;
17mod state;
18pub mod synchronizer;