Registry / networking / mapr
library0.8.0rscratesunverified

Cross-platform Rust API for memory-mapped file IO

# Cargo.toml [dependencies] mapr = "0.8.0"
INSTALL
IMPORT
SIG · MAPR
M
mapr
networkingrustv0.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mmap
use mapr::Mmap;

Memory-maps a file and prints its size

use mapr::Mmap; use std::fs::File; fn main() -> Result<(), Box<dyn std::error::Error>> { let file = File::open("example.txt")?; let mmap = unsafe { Mmap::map(&file)? }; println!("File size: {} bytes", mmap.len()); Ok(()) }
Debug
Known issues
gotchaUnsafe: memory mapping can cause undefined behavior if the file is modified concurrently
fix
Ensure the file is not modified while mapped, or use safe wrappers like memmap2
affects: >=0.8.0
Upgrade
Version history
0.8.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
mapr — cargo add mapr · libregistry