[package]
name = "iokit"
version = "0.5.1"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/doom-fish/iokit-rs"
repository = "https://github.com/doom-fish/iokit-rs"
description = "Safe Rust bindings for Apple's IOKit user-space APIs with a Swift bridge for services, registry, power management, and power sources on macOS"
authors = ["Per Johansson <per@doom.fish>"]
keywords = ["iokit", "macos", "hardware", "power", "registry"]
categories = ["api-bindings", "os::macos-apis", "hardware-support"]
rust-version = "1.76"
readme = "README.md"
build = "build.rs"
include = [
    "src/**/*",
    "swift-bridge/Package.swift",
    "swift-bridge/Sources/**/*",
    "examples/**/*",
    "tests/**/*",
    "build.rs",
    "Cargo.toml",
    "README.md",
    "COVERAGE.md",
    "LICENSE-*",
    "CHANGELOG.md",
]

[features]
default = ["raw-ffi"]
raw-ffi = []
async = ["dep:doom-fish-utils"]

[lints.rust]

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }

[lib]
name = "iokit"
crate-type = ["lib"]

[dependencies]
apple-cf = { version = ">=0.9, <0.10", default-features = false, features = ["cg"] }
doom-fish-utils = { path = "../doom-fish-utils", version = ">=0.1, <0.3", optional = true }

[dev-dependencies]
pollster = "0.3"

[package.metadata.docs.rs]
all-features = true
default-target = "aarch64-apple-darwin"
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
rustdoc-args = ["--cfg", "docsrs"]

[badges]
maintenance = { status = "actively-developed" }

[[example]]
name = "01_smoke"

[[example]]
name = "13_async_stream"
required-features = ["async"]

[profile.release]
debug = "full"
strip = "none"
