Skip to main content

Crate ghook_macros

Crate ghook_macros 

Source
Expand description

§ghook-macros

Procedural macros for the ghook modding framework.

This crate provides the compile-time code generation that powers ghook:

§Note

This crate is a proc-macro crate and cannot be used directly. Import these macros through ghook-sdk instead:

ⓘ
use ghook_sdk::*; // Re-exports all macros

§License

Licensed under the Mozilla Public License 2.0.

§Author

Semyon Tsarev

Macros§

use_game_hooks
Reads a game binary and auto-generates hook argument/result types.

Attribute Macros§

hookable
Marks a function as hookable by mods.
mod_info
Embeds mod metadata into a dedicated binary section.
mod_init
Marks a function as the mod’s initialization entry point.
postfix
Defines a postfix hook that runs after the original function.
prefix
Defines a prefix hook that runs before the original function.
replace
Defines a replace hook that completely substitutes the original function.