# 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 = "2021"
rust-version = "1.76"
name = "iokit"
version = "0.5.1"
authors = ["Per Johansson <per@doom.fish>"]
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",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
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"
homepage = "https://github.com/doom-fish/iokit-rs"
readme = "README.md"
keywords = [
    "iokit",
    "macos",
    "hardware",
    "power",
    "registry",
]
categories = [
    "api-bindings",
    "os::macos-apis",
    "hardware-support",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/doom-fish/iokit-rs"

[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"

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

[lib]
name = "iokit"
crate-type = ["lib"]
path = "src/lib.rs"

[[example]]
name = "01_smoke"
path = "examples/01_smoke.rs"

[[example]]
name = "02_io_service"
path = "examples/02_io_service.rs"

[[example]]
name = "03_io_connect"
path = "examples/03_io_connect.rs"

[[example]]
name = "04_io_registry"
path = "examples/04_io_registry.rs"

[[example]]
name = "05_io_notification_port"
path = "examples/05_io_notification_port.rs"

[[example]]
name = "06_io_iterator"
path = "examples/06_io_iterator.rs"

[[example]]
name = "07_iopm"
path = "examples/07_iopm.rs"

[[example]]
name = "08_iops"
path = "examples/08_iops.rs"

[[example]]
name = "09_io_message"
path = "examples/09_io_message.rs"

[[example]]
name = "10_iohi_backing_store"
path = "examples/10_iohi_backing_store.rs"

[[example]]
name = "11_io_kit"
path = "examples/11_io_kit.rs"

[[example]]
name = "12_io_hid"
path = "examples/12_io_hid.rs"

[[example]]
name = "13_async_stream"
path = "examples/13_async_stream.rs"
required-features = ["async"]

[[test]]
name = "async_stream_tests"
path = "tests/async_stream_tests.rs"

[[test]]
name = "io_connect"
path = "tests/io_connect.rs"

[[test]]
name = "io_hid"
path = "tests/io_hid.rs"

[[test]]
name = "io_iterator"
path = "tests/io_iterator.rs"

[[test]]
name = "io_kit"
path = "tests/io_kit.rs"

[[test]]
name = "io_message"
path = "tests/io_message.rs"

[[test]]
name = "io_notification_port"
path = "tests/io_notification_port.rs"

[[test]]
name = "io_registry"
path = "tests/io_registry.rs"

[[test]]
name = "io_service"
path = "tests/io_service.rs"

[[test]]
name = "iohi_backing_store"
path = "tests/iohi_backing_store.rs"

[[test]]
name = "iopm"
path = "tests/iopm.rs"

[[test]]
name = "iops"
path = "tests/iops.rs"

[[test]]
name = "raw_ffi_surface"
path = "tests/raw_ffi_surface.rs"

[dependencies.apple-cf]
version = ">=0.9, <0.10"
features = ["cg"]
default-features = false

[dependencies.doom-fish-utils]
version = ">=0.1, <0.3"
optional = true

[dev-dependencies.pollster]
version = "0.3"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]

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