Skip to main content

Crate procmod_layout

Crate procmod_layout 

Source
Expand description

Struct mapping with pointer chain traversal via derive macros.

Map remote process memory into Rust structs using #[derive(GameStruct)]. Each field declares its byte offset from a base address. Fields can follow pointer chains through multiple indirections before reading the final value.

Built on top of procmod-core for cross-platform memory access.

§Example

use procmod_layout::{GameStruct, Process};

#[derive(GameStruct)]
struct Player {
    #[offset(0x100)]
    health: f32,
    #[offset(0x104)]
    max_health: f32,
    #[offset(0x200)]
    #[pointer_chain(0x10, 0x8)]
    damage_mult: f32,
}

let process = Process::attach(pid)?;
let player = Player::read(&process, base_address)?;
println!("hp: {}/{}", player.health, player.max_health);

Structs§

Process
A handle to an external process for memory operations.

Enums§

Error
Errors that can occur during process memory operations.

Type Aliases§

Result
Result type alias for procmod-core operations.

Derive Macros§

GameStruct
Derives a read method that maps a remote process’s memory into a Rust struct.