# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "sighook"
version = "0.9.0"
authors = ["YinMo19 <me@yinmo19.top>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An Apple/Linux/Android runtime instrumentation and inline hooking crate for aarch64 and x86_64."
homepage = "https://blog.yinmo19.top"
documentation = "https://docs.rs/sighook"
readme = "README.md"
keywords = [
    "ios",
    "android",
    "aarch64",
    "x86_64",
    "hook",
]
license = "LGPL-2.1-only"
repository = "https://github.com/YinMo19/sighook"

[package.metadata.docs.rs]
default-target = "aarch64-apple-darwin"
targets = [
    "aarch64-apple-darwin",
    "x86_64-apple-darwin",
    "aarch64-apple-ios",
    "aarch64-unknown-linux-gnu",
    "aarch64-linux-android",
    "x86_64-unknown-linux-gnu",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = []
patch_asm = ["dep:keystone-engine"]

[lib]
name = "sighook"
crate-type = [
    "rlib",
    "cdylib",
]
path = "src/lib.rs"

[[example]]
name = "inline_hook_far"
crate-type = ["cdylib"]
path = "examples/inline_hook_far/main.rs"

[[example]]
name = "inline_hook_signal"
crate-type = ["cdylib"]
path = "examples/inline_hook_signal/main.rs"

[[example]]
name = "instrument_adrp_no_original"
crate-type = ["cdylib"]
path = "examples/instrument_adrp_no_original/main.rs"

[[example]]
name = "instrument_no_original"
crate-type = ["cdylib"]
path = "examples/instrument_no_original/main.rs"

[[example]]
name = "instrument_unhook_restore"
crate-type = ["cdylib"]
path = "examples/instrument_unhook_restore/main.rs"

[[example]]
name = "instrument_with_original"
crate-type = ["cdylib"]
path = "examples/instrument_with_original/main.rs"

[[example]]
name = "patch_asm_add_to_mul"
crate-type = ["cdylib"]
path = "examples/patch_asm_add_to_mul/main.rs"
required-features = ["patch_asm"]

[[example]]
name = "patchcode_add_to_mul"
crate-type = ["cdylib"]
path = "examples/patchcode_add_to_mul/main.rs"

[dependencies.libc]
version = "0.2"

[target.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.dependencies.iced-x86]
version = "1.21"

[target.'cfg(any(all(target_os = "macos", target_arch = "aarch64"), all(target_os = "macos", target_arch = "x86_64"), all(target_os = "linux", target_arch = "aarch64"), all(target_os = "linux", target_arch = "x86_64")))'.dependencies.keystone-engine]
version = "0.1.0"
features = ["build-from-src"]
optional = true
default-features = false
