[package]
name = "apple-metal"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/doom-fish/apple-metal-rs"
repository = "https://github.com/doom-fish/apple-metal-rs"
description = "Safe Rust bindings for Apple's Metal framework — GPU access + IOSurface zero-copy texture interop on macOS"
authors = ["Per Johansson <per@doom.fish>"]
keywords = ["metal", "gpu", "iosurface", "macos", "apple"]
categories = ["api-bindings", "os::macos-apis", "graphics"]
rust-version = "1.76"
readme = "README.md"
include = [
    "src/**/*",
    "Cargo.toml",
    "README.md",
    "LICENSE-*",
    "CHANGELOG.md",
]

[lints.rust]

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

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

[features]
# Enable IOSurfaceMetalExt — zero-copy GPU textures from IOSurface-backed
# pixel data. Pulls in apple-cf's IOSurface module.
default = ["iosurface"]
iosurface = ["dep:apple-cf"]

[dependencies]
apple-cf = { path = "../apple-cf-rs", version = "0.1.1", default-features = false, features = ["iosurface"], optional = true }

[dev-dependencies]

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

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

[[example]]
name = "01_get_device"
