Crates.io | fmmap |
lib.rs | fmmap |
version | 0.3.3 |
source | src |
created_at | 2021-12-09 13:18:29.047602 |
updated_at | 2023-09-18 11:17:40.392511 |
description | A flexible and convenient high-level mmap for zero-copy file I/O. |
homepage | |
repository | https://github.com/al8n/fmmap/tree/main/fmmap-rs |
max_upload_size | |
id | 495149 |
size | 554,231 |
The design of this crate is inspired by Dgraph's mmap file implementation in Stretto.
All of file-backed memory map has the potential for Undefined Behavior (UB) if the underlying file is subsequently modified (e.g. the file is deleted by another process), in or out of process, this crate tries to avoid this situation by provide file lock APIs.
This crate supports std and popular async runtime(tokio, async-std, smol), and thanks to macro
in Rust, it is super easy to support any new async runtime. For details, please see the implementation for tokio, async-std, smol of the source code.
MAP_STACK
on unix)std
[dependencies]
fmmap = 0.2
[dependencies]
fmmap = { version = "0.3", features = ["tokio-async"] }
[dependencies]
fmmap = { version = "0.3", features = ["std-async"] }
[dependencies]
fmmap = { version = "0.3", features = ["smol-async"] }
This crate is 100% documented, see documents for examples.