# vimpunk/mio

Cross-platform C++11 header-only library for memory mapped file IO

Repository: https://github.com/vimpunk/mio
Canonical: https://ross.abutalabs.com/products/vimpunk-mio
Language: C++
License: MIT
License Family: permissive
Topics: cpp, cpp11, cpp14, memory-mapped-file, memory-mapping, mmap, fileviewer, file-view, header-only, cross-platform
Last push: 2024-02-11T17:37:47+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3260, "days_push": 934, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1953, forks 180 (observed 2026-08-28T04:05:58.811653+00:00)

## What it is
mio is a cross-platform, header-only C++11 library for memory mapped file IO, serving as a lightweight alternative to Boost.Iostreams' mmap functionality. It supports mapping via file paths or already-open file handles, accepts arbitrary offsets by handling page-boundary alignment internally, and offers both move-only and shared-semantics mapping classes.

## Use cases
- memory map a file in C++ without pulling in Boost
- create a memory mapping from an already open file descriptor
- read large files efficiently via mmap in a cross-platform way
- map a region of a file at an arbitrary offset
- use memory mapped IO in a project built with -fno-exceptions
- share a mapping between objects with shared semantics

## When to choose
- you need memory mapped file IO in C++ with zero dependencies
- you want to map from an existing file handle or use non-page-aligned offsets
- you want a header-only, MIT-licensed, cross-platform mmap abstraction

## When to avoid
- you need buffered or streamed IO rather than memory mapping
- you already depend on Boost and prefer Boost.Iostreams
- you need the library to validate file descriptor access permissions for you

## Facets
- artifact type: library
- maturity: stable
- function: file-system, developer-tools
- domain: files, developer-tools, cross-platform
- platform: windows, cpp, cross-platform
- tags: memory-mapped-files, mmap, header-only, cpp11, no-dependencies, linux, macos

## Member repositories
- vimpunk/mio (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:58.811653+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:06:34.376532+00:00, confidence not recorded.
  - readme: https://github.com/vimpunk/mio (fetched 2026-08-28T04:05:58.811653+00:00, sha 952675b7c936)
- Data as of 2026-08-30T08:39:29.467469+00:00.
