Registry / utility / memmap

memmap

JSON →
library0.7.0rscratesunverified

Cross-platform Rust API for memory-mapped file IO.

# Cargo.toml [dependencies] memmap = "0.7.0"
INSTALL
IMPORT
SIG · MEMMAP
M
memmap
utilityrustv0.7.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 memmap::Mmap;

Memory-maps a file and reads the first 10 bytes.

use memmap::Mmap; use std::fs::File; let file = File::open("example.txt").unwrap(); let mmap = unsafe { Mmap::map(&file).unwrap() }; println!("{:?}", &mmap[..10]);
Debug
Known issues
gotchaUnsafe: Mmap::map requires unsafe block; incorrect usage can cause undefined behavior.
fix
Ensure the mapped region is not mutated while borrowed, and handle file size correctly.
affects: >=0.7.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
memmap — cargo add memmap · libregistry