[package]
edition = "2021"
rust-version = "1.76"
name = "screencapturekit"
version = "9.0.1"
authors = ["Per Johansson <per@doom.fish>"]
build = "build.rs"
include = [
"/src/**/*",
"/swift-bridge/Package.swift",
"/swift-bridge/Sources/**/*",
"/examples/**/*",
"/tests/**/*",
"/benches/**/*",
"/docs/**/*",
"/build.rs",
"/Cargo.toml",
"/README.md",
"/LICENSE-*",
"/CHANGELOG.md",
"/COVERAGE.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Safe Rust bindings for Apple's ScreenCaptureKit framework - screen and audio capture on macOS"
homepage = "https://github.com/doom-fish/screencapturekit-rs"
documentation = "https://doom-fish.github.io/screencapturekit-rs/screencapturekit/"
readme = "README.md"
keywords = [
"screencapturekit",
"screen-capture",
"macos",
"video",
"audio",
]
categories = [
"multimedia",
"os::macos-apis",
"api-bindings",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/doom-fish/screencapturekit-rs"
[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
targets = [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
]
rustdoc-args = [
"--cfg",
"docsrs",
]
[badges.maintenance]
status = "actively-developed"
[features]
async = ["dep:futures-core"]
cargo-clippy = []
default = []
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"]
[lib]
name = "screencapturekit"
crate-type = ["lib"]
path = "src/lib.rs"
[[example]]
name = "01_basic_capture"
path = "examples/01_basic_capture.rs"
[[example]]
name = "02_window_capture"
path = "examples/02_window_capture.rs"
[[example]]
name = "03_audio_capture"
path = "examples/03_audio_capture.rs"
[[example]]
name = "04_pixel_access"
path = "examples/04_pixel_access.rs"
[[example]]
name = "05_screenshot"
path = "examples/05_screenshot.rs"
required-features = ["macos_14_0"]
[[example]]
name = "06_iosurface"
path = "examples/06_iosurface.rs"
[[example]]
name = "07_list_content"
path = "examples/07_list_content.rs"
[[example]]
name = "08_async"
path = "examples/08_async.rs"
required-features = ["async"]
[[example]]
name = "09_closure_handlers"
path = "examples/09_closure_handlers.rs"
[[example]]
name = "10_recording_output"
path = "examples/10_recording_output.rs"
required-features = ["macos_15_0"]
[[example]]
name = "11_content_picker"
path = "examples/11_content_picker.rs"
required-features = ["macos_14_0"]
[[example]]
name = "12_stream_updates"
path = "examples/12_stream_updates.rs"
required-features = ["macos_14_0"]
[[example]]
name = "13_advanced_config"
path = "examples/13_advanced_config.rs"
required-features = ["macos_15_0"]
[[example]]
name = "14_app_capture"
path = "examples/14_app_capture.rs"
[[example]]
name = "15_memory_leak_check"
path = "examples/15_memory_leak_check.rs"
required-features = ["macos_15_0"]
[[example]]
name = "16_full_metal_app"
path = "examples/16_full_metal_app/main.rs"
required-features = ["macos_15_0"]
[[example]]
name = "17_metal_textures"
path = "examples/17_metal_textures.rs"
[[example]]
name = "18_wgpu_integration"
path = "examples/18_wgpu_integration.rs"
[[example]]
name = "19_ffmpeg_encoding"
path = "examples/19_ffmpeg_encoding.rs"
[[example]]
name = "20_egui_viewer"
path = "examples/20_egui_viewer.rs"
[[example]]
name = "21_bevy_streaming"
path = "examples/21_bevy_streaming.rs"
[[example]]
name = "23_client_server_client"
path = "examples/23_client_server/client.rs"
[[example]]
name = "23_client_server_server"
path = "examples/23_client_server/server.rs"
[[example]]
name = "24_batched_apis_showcase"
path = "examples/24_batched_apis_showcase.rs"
required-features = ["macos_14_0"]
[[example]]
name = "profile_capture"
path = "examples/profile_capture.rs"
required-features = ["macos_14_0"]
[[test]]
name = "async_api_tests"
path = "tests/async_api_tests.rs"
[[test]]
name = "audio_buffer_allocator_test"
path = "tests/audio_buffer_allocator_test.rs"
[[test]]
name = "audio_buffer_tests"
path = "tests/audio_buffer_tests.rs"
[[test]]
name = "audio_devices_tests"
path = "tests/audio_devices_tests.rs"
[[test]]
name = "audio_video_capture"
path = "tests/audio_video_capture.rs"
[[test]]
name = "block_buffer_tests"
path = "tests/block_buffer_tests.rs"
[[test]]
name = "cg_types_tests"
path = "tests/cg_types_tests.rs"
[[test]]
name = "cm_types_tests"
path = "tests/cm_types_tests.rs"
[[test]]
name = "completion_tests"
path = "tests/completion_tests.rs"
[[test]]
name = "configuration_builder_tests"
path = "tests/configuration_builder_tests.rs"
[[test]]
name = "configuration_tests"
path = "tests/configuration_tests.rs"
[[test]]
name = "content_filter_tests"
path = "tests/content_filter_tests.rs"
[[test]]
name = "content_sharing_picker_tests"
path = "tests/content_sharing_picker_tests.rs"
[[test]]
name = "coverage_gap_tests"
path = "tests/coverage_gap_tests.rs"
[[test]]
name = "delegate_trait_tests"
path = "tests/delegate_trait_tests.rs"
[[test]]
name = "dispatch_queue_tests"
path = "tests/dispatch_queue_tests.rs"
[[test]]
name = "eq_hash_tests"
path = "tests/eq_hash_tests.rs"
[[test]]
name = "error_code_tests"
path = "tests/error_code_tests.rs"
[[test]]
name = "error_tests"
path = "tests/error_tests.rs"
[[test]]
name = "ffi_layout_tests"
path = "tests/ffi_layout_tests.rs"
[[test]]
name = "ffi_string_tests"
path = "tests/ffi_string_tests.rs"
[[test]]
name = "format_description_tests"
path = "tests/format_description_tests.rs"
[[test]]
name = "fourcharcode_tests"
path = "tests/fourcharcode_tests.rs"
[[test]]
name = "frame_status_tests"
path = "tests/frame_status_tests.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "iosurface_tests"
path = "tests/iosurface_tests.rs"
[[test]]
name = "memory_tests"
path = "tests/memory_tests.rs"
[[test]]
name = "metal_tests"
path = "tests/metal_tests.rs"
[[test]]
name = "picker_tests"
path = "tests/picker_tests.rs"
[[test]]
name = "pixel_buffer_tests"
path = "tests/pixel_buffer_tests.rs"
[[test]]
name = "recording_output_tests"
path = "tests/recording_output_tests.rs"
[[test]]
name = "screenshot_manager_tests"
path = "tests/screenshot_manager_tests.rs"
[[test]]
name = "shareable_content_current_process_tests"
path = "tests/shareable_content_current_process_tests.rs"
[[test]]
name = "shareable_content_info_tests"
path = "tests/shareable_content_info_tests.rs"
[[test]]
name = "shareable_content_snapshot_tests"
path = "tests/shareable_content_snapshot_tests.rs"
[[test]]
name = "stream_lifecycle_tests"
path = "tests/stream_lifecycle_tests.rs"
[[test]]
name = "stream_routing_tests"
path = "tests/stream_routing_tests.rs"
[[bench]]
name = "capture_benchmark"
path = "benches/capture_benchmark.rs"
harness = false
required-features = ["macos_14_0"]
[[bench]]
name = "hotspots"
path = "benches/hotspots.rs"
harness = false
required-features = ["macos_14_0"]
[dependencies.apple-cf]
version = ">=0.6, <0.10"
features = [
"cg",
"iosurface",
"dispatch",
"cv",
"cm",
]
default-features = false
[dependencies.apple-metal]
version = ">=0.6, <0.9"
default-features = false
[dependencies.futures-core]
version = "0.3"
optional = true
default-features = false
[dev-dependencies.bevy]
version = "0.19"
features = [
"bevy_asset",
"bevy_winit",
"bevy_render",
"bevy_sprite",
"bevy_core_pipeline",
"x11",
]
default-features = false
[dev-dependencies.bitflags]
version = ">=2.0, <2.14"
[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[dev-dependencies.eframe]
version = "0.34"
[dev-dependencies.futures-util]
version = "0.3"
default-features = false
[dev-dependencies.png]
version = "0.18"
[dev-dependencies.pollster]
version = "0.4"
[dev-dependencies.raw-window-handle]
version = "0.6"
[dev-dependencies.tokio]
version = "1"
features = [
"sync",
"rt",
"rt-multi-thread",
"macros",
"test-util",
]
[dev-dependencies.wgpu]
version = "29"
[dev-dependencies.winit]
version = "0.30"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
unsafe_op_in_unsafe_fn = "warn"
[profile.release]
debug = 2
strip = "none"