easy_mmap

Crates.ioeasy_mmap
lib.rseasy_mmap
version0.3.1
created_at2022-08-24 22:30:17.741743+00
updated_at2022-08-29 22:16:27.932701+00
descriptionStrongly typed memory mapped files that allow for easy manipulation of large amounts of data.
homepage
repositoryhttps://github.com/TiagoMAntunes/easy_mmap
max_upload_size
id651822
size16,979
Tiago Antunes (TiagoMAntunes)

documentation

README

easy_mmap

Note: This crate is still in early development!

This library provides a simple to user interface to manipulate memory mapped memory by forcing the usage of Rust's strong typing system. It's a simple abstraction over the mmap crate.

It further abstracts the memory mapped region by also supporting iterators and easy local updates.

Example usage:

use easy_mmap::EasyMmapBuilder;
use mmap::MapOption;

fn main() {
    let map = &mut EasyMmapBuilder::<u32>::new()
        .capacity(10)
        .options(&[MapOption::MapReadable, MapOption::MapWritable])
        .build();

    map.iter_mut()
        .enumerate()
        .for_each(|(idx, x)| *x = idx as u32);

    map.iter().for_each(|v| {
        print!("{} ", v);
    });
}
Commit count: 29

cargo fmt