{"id":57375,"library":"memmap2","title":"memmap2","description":"Cross-platform Rust API for memory-mapped file IO","status":"active","version":"0.9.10","language":"rust","source_language":null,"source_url":"https://github.com/RazrFalcon/memmap2-rs","tags":["memory-mapped","io","file","mmap"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nmemmap2 = \"0.9.10\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add memmap2","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Mmap","correct":"use memmap2::Mmap;"}],"quickstart":{"code":"use memmap2::Mmap;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n    let file = File::open(\"example.txt\")?;\n    let mmap = unsafe { Mmap::map(&file)? };\n    println!(\"{:?}\", &mmap[..10]);\n    Ok(())\n}","lang":"rust","description":"Memory-map a file and read its contents."},"warnings":[{"fix":"Ensure the file is not modified while the mapping exists, or use `Mmap::map_readonly` for read-only access.","message":"Mmap::map is unsafe because it can cause undefined behavior if the underlying file is mutated concurrently.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'api':6 'cross':3 'cross-platform':2 'file':11,17 'io':12,16 'map':10,15 'memmap2':1 'memori':9,14 'memory-map':8,13 'mmap':18 'platform':4 'rust':5","created_at":"2026-06-16T15:39:58.350914+00:00","updated_at":"2026-06-16T15:39:58.350914+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/RazrFalcon/memmap2-rs","github":"https://github.com/RazrFalcon/memmap2-rs","docs":"https://docs.rs/memmap2/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}