hooking 0.8.0

cross platform detour / hooking library in rust
Documentation
//! Function hooking: the [`Hook`] handle, the [`HookWriter`] that builds hooks
//! into an arena, the [`MiniHook`] variant, and (on x86-64) the save-registers
//! dispatch API.
//!
//! ```no_run
//! use hooking::Hook;
//! # extern "C" fn target(a: u64) -> u64 { a }
//! # extern "C" fn detour(a: u64) -> u64 { a + 1 }
//! let mut hook = unsafe { Hook::create(target as *mut u8, detour as *mut u8) }.unwrap();
//! unsafe { hook.apply_hook().unwrap() };
//! ```

mod builder;
mod hook;
mod kind;
mod mini;
mod patch_state;
mod writer;

#[cfg(target_arch = "x86_64")]
mod save_registers;

#[cfg(target_arch = "x86_64")]
pub use self::save_registers::*;

pub use self::builder::HookBuilder;
#[cfg(target_arch = "x86_64")]
pub use self::builder::{Dispatch, SavedRegisterHook};
pub use self::hook::{Hook, HookData};
pub use self::kind::HookKind;
pub use self::mini::{MiniHook, MiniHookData};
pub use self::writer::HookWriter;