7 releases

0.3.2 Aug 5, 2023
0.3.1 Jan 6, 2022
0.3.0 Nov 2, 2020
0.2.0 Aug 4, 2020
0.1.3 Jul 28, 2020

#613 in Unix APIs

Download history 774/week @ 2025-11-01 685/week @ 2025-11-08 487/week @ 2025-11-15 826/week @ 2025-11-22 1230/week @ 2025-11-29 1917/week @ 2025-12-06 1507/week @ 2025-12-13 450/week @ 2025-12-20 59/week @ 2025-12-27 898/week @ 2026-01-03 821/week @ 2026-01-10 743/week @ 2026-01-17 782/week @ 2026-01-24 557/week @ 2026-01-31 240/week @ 2026-02-07 341/week @ 2026-02-14

1,957 downloads per month

MIT license

17KB
300 lines

procmaps.rs

CI Crates.io

procmaps.rs is a (very) small Rust library with one job: parsing the memory maps that Linux (and some other Unices) expose via /proc/<pid>/maps with a pleasant structure.

I wrote it before realizing that procmaps already exists. You should probably use that one instead, since it's nearly identical.

A quick sample:

let maps = rsprocmaps::from_pid(9001)?;

for map in maps {
  println!("{} executable? {}", map.address_range, map.permissions.executable);
}

Full documentation is available on docs.rs.

Goals

  • Parsing /proc/<pid>/maps correctly and into a clean structure

Anti-goals

  • Parsing other parts of /proc
  • Resolving fundamental ambiguities in the maps file format (e.g. newlines and deleted pathnames)

Dependencies

~2.4–3.5MB
~69K SLoC