[package]
name = "ccap-rs"
version = "1.5.1"
edition = "2021"
rust-version = "1.65"
authors = ["wysaid <this@wysaid.org>"]
license = "MIT"
description = "Rust bindings for ccap — high-performance, cross-platform webcam/camera capture with hardware-accelerated pixel format conversion (DirectShow/AVFoundation/V4L2), including common RGB/YUV workflows and video file input/playback support"
homepage = "https://ccap.work"
repository = "https://github.com/wysaid/CameraCapture"
documentation = "https://docs.rs/ccap-rs"
readme = "README.md"
keywords = ["camera", "webcam", "capture", "video", "ccap"]
categories = ["multimedia::video", "api-bindings"]

[package.metadata.docs.rs]
# docs.rs builds on Linux; explicitly build in the crates.io-friendly mode.
no-default-features = true
features = ["build-source"]
targets = ["x86_64-unknown-linux-gnu"]



[lib]
# Keep the Rust crate name as `ccap` so users can write:
#   ccap = { package = "ccap-rs", version = "..." }
# and still `use ccap::Provider;`
name = "ccap"

[dependencies]
thiserror = "1.0"

[build-dependencies]
bindgen = "0.68"
cc = "1.0"

[features]
default = ["build-source"]
static-link = [] # Link against pre-built static library (for development)
build-source = [] # Build from source using cc crate (for distribution)

[[example]]
name = "print_camera"
path = "examples/print_camera.rs"

[[example]]
name = "minimal_example"
path = "examples/minimal_example.rs"

[[example]]
name = "capture_grab"
path = "examples/capture_grab.rs"

[[example]]
name = "capture_callback"
path = "examples/capture_callback.rs"
