[package]
name = "ib-hook"
version = "0.2.2"
edition = "2024"
rust-version = "1.94"
description = "Windows binary and system hooking library."
keywords = ["hooking", "detours", "process", "inject", "shell"]
repository.workspace = true
license.workspace = true
[features]
default = ["std"]
std = [
"thiserror/std",
"serde?/std",
]
inline = ["dep:slim-detours-sys"]
sysinfo = ["dep:sysinfo"]
inject-dll = [
"std",
"dep:dll-syringe",
"serde",
]
inject-dll-dll = [
"dep:dtor",
"dep:dll-syringe",
"serde",
]
serde = ["dep:serde"]
tracing = ["dep:tracing"]
doc = ["dep:document-features"]
[dependencies]
bon = "3"
derive_more = { version = "2", features = ["deref", "deref_mut", "display", "from"] }
dll-syringe = { version = "0.17", optional = true, features = ["payload-utils", "rpc-core"] }
document-features = { version = "0.2", optional = true }
dtor = { version = "0.1", optional = true }
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
sysinfo = { version = ">=0.34,<0.39", optional = true, default-features = false, features = ["system"] }
thiserror = { version = "2", default-features = false }
tracing = { version = "0.1", optional = true }
[target.'cfg(target_family = "windows")'.dependencies]
slim-detours-sys = { version = "0.4", optional = true }
windows = { version = "0.62", features = [
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_UI_Controls",
"Win32_UI_WindowsAndMessaging",
] }
[dev-dependencies]
ib-hook = { path = ".", features = [
"inline",
"sysinfo",
"inject-dll",
"inject-dll-dll",
"tracing",
] }
test-log = { version = "0.2", default-features = false, features = ["trace", "unstable"] }
[[example]]
name = "app-dll"
required-features = ["inject-dll", "inject-dll-dll"]
crate-type = ["cdylib"]
[[example]]
name = "app-dll-unapply"
required-features = ["inject-dll", "inject-dll-dll"]
crate-type = ["cdylib"]
[[bin]]
name = "inject-app-dll"
required-features = ["inject-dll"]
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc"]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]