screencapturekit 1.5.2

Safe Rust bindings for Apple's ScreenCaptureKit framework - screen and audio capture on macOS
[package]
name = "screencapturekit"
version = "1.5.2"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/doom-fish/screencapturekit-rs"
repository = "https://github.com/doom-fish/screencapturekit-rs"
documentation = "https://doom-fish.github.io/screencapturekit-rs/screencapturekit/"
description = "Safe Rust bindings for Apple's ScreenCaptureKit framework - screen and audio capture on macOS"
authors = ["Per Johansson <per@doom.fish>"]
keywords = ["screencapturekit", "screen-capture", "macos", "video", "audio"]
categories = ["multimedia", "os::macos-apis", "api-bindings"]
rust-version = "1.70"
readme = "README.md"
build = "build.rs"
include = [
    "src/**/*",
    "swift-bridge/Package.swift",
    "swift-bridge/Sources/**/*",
    "build.rs",
    "Cargo.toml",
    "README.md",
    "LICENSE-*",
    "CHANGELOG.md",
]

[lints.rust]
# TODO: Enable after adding unsafe blocks inside unsafe fns
# unsafe_op_in_unsafe_fn = "warn"
# TODO: Enable after adding Debug impls to public types
# missing_debug_implementations = "warn"

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

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

[features]
default = []
cargo-clippy = []

# Async support (executor-agnostic, works with any async runtime)
async = []

# macOS version feature flags
# Enable features for specific macOS versions
# NB: when adding new versions, be sure to update build.rs to pass
#     the correct feature flags over to the Swift bridge build.
macos_13_0 = []
macos_14_0 = ["macos_13_0"]
macos_14_2 = ["macos_14_0"]
macos_14_4 = ["macos_14_2"]
macos_15_0 = ["macos_14_4"]
macos_15_2 = ["macos_15_0"]
macos_26_0 = ["macos_15_2"]

[dependencies]

[dev-dependencies]
png = "0.18"
tokio = { version = "1", features = ["sync", "rt", "rt-multi-thread", "macros", "test-util"] }
winit = "0.30"
raw-window-handle = "0.6"
criterion = { version = "0.8", features = ["html_reports"] }
eframe = "0.33"
wgpu = "24"
pollster = "0.4"
bevy = { version = "0.15", default-features = false, features = ["bevy_asset", "bevy_winit", "bevy_render", "bevy_sprite", "bevy_core_pipeline", "x11"] }

[[bench]]
name = "capture_benchmark"
harness = false

[package.metadata.docs.rs]
# Build documentation with all features enabled
all-features = true
# docs.rs builds on Linux, but this crate only works on macOS
default-target = "x86_64-apple-darwin"
targets = ["x86_64-apple-darwin", "aarch64-apple-darwin"]
# Enable rustdoc unstable features for better docs
rustdoc-args = ["--cfg", "docsrs"]

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

[[example]]
name = "05_screenshot"
required-features = ["macos_14_0"]

[[example]]
name = "08_async"
required-features = ["async"]

[[example]]
name = "10_recording_output"
required-features = ["macos_15_0"]

[[example]]
name = "11_content_picker"
required-features = ["macos_14_0"]

[[example]]
name = "13_advanced_config"
required-features = ["macos_15_0"]

[[example]]
name = "16_full_metal_app"
path = "examples/16_full_metal_app/main.rs"
required-features = ["macos_14_0"]

# Note: 22_tauri_app is a separate Tauri project, run with:
#   cd examples/22_tauri_app && npm install && npm run tauri dev

[[example]]
name = "23_client_server_server"
path = "examples/23_client_server/server.rs"

[[example]]
name = "23_client_server_client"
path = "examples/23_client_server/client.rs"