Map remote process memory into Rust structs. Declare byte offsets on each field, optionally follow pointer chains through multiple indirections, and read the entire struct in one call. Built on procmod-core.
Install
[]
= "1"
Quick start
Read a game's player state from a known base address:
use ;
Usage
Basic struct mapping
Every field needs an #[offset(N)] attribute specifying its byte offset from the base address. The derive macro generates a read(process, base) -> Result<Self> method.
use ;
Pointer chains
When a value is behind one or more pointer indirections, use #[pointer_chain(...)] to follow the chain automatically. The offsets list the intermediate dereference offsets before reading the final value.
For example, reading a damage multiplier stored behind two pointer hops:
use ;
// The pointer chain for damage_mult reads:
// 1. read pointer at (base + 0x60)
// 2. read pointer at (ptr + 0x10)
// 3. read f32 at (ptr + 0x08)
Composing with procmod-scan
Use procmod-scan to find a structure's base address after a game update, then read it with a layout:
use ;
use Pattern;
Supported types
All field types must be Copy and valid for any bit pattern. Types with validity invariants (bool, char, enums) must not be used - read them as their underlying integer type instead (e.g., u8 for booleans).
- Numeric primitives:
u8,u16,u32,u64,i8,i16,i32,i64,f32,f64,usize - Fixed-size arrays:
[f32; 3],[u8; 16], etc. - Any
#[repr(C)]struct that isCopyand valid for any bit pattern
License
MIT