[package]
# ============================================================================
# PACKAGE IDENTITY
# ============================================================================
name = "lamco-video"
version = "0.1.7"

# ============================================================================
# PACKAGE CONFIGURATION (inherited from workspace)
# ============================================================================
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
authors.workspace = true

# ============================================================================
# CRATE-SPECIFIC METADATA
# ============================================================================
description = "Video frame processing and bitmap conversion for Wayland screen capture, by Lamco Development"
documentation = "https://docs.rs/lamco-video"
readme = "README.md"

# Keywords for crates.io search (max 5, max 20 chars each)
keywords = ["video", "bitmap", "wayland", "screen-capture", "frame"]

# Categories for crates.io browsing (max 5)
# See: https://crates.io/category_slugs
categories = [
    "multimedia::video",   # Video processing
    "graphics",            # Bitmap/image operations
    "asynchronous",        # Async/await API design
]

# ============================================================================
# PUBLISHING CONFIGURATION
# ============================================================================

# Files to exclude from the published crate (reduces download size)
exclude = [
    "/.github/",
    "/tests/",
    "*.orig",
    "*.original",
    "*.bak",
]

# ============================================================================
# BADGES (maintenance status)
# ============================================================================
[badges]
maintenance = { status = "actively-developed" }

# ============================================================================
# DOCS.RS CONFIGURATION
# ============================================================================
[package.metadata.docs.rs]
# Build docs with all features enabled for comprehensive documentation
all-features = true
# docs.rs is Linux-only, which matches our target
targets = ["x86_64-unknown-linux-gnu"]
# Allow building even if lamco-pipewire fails (it needs PipeWire system libs)
# The documentation will still be useful as API reference
rustdoc-args = ["--cfg", "docsrs"]

# ============================================================================
# FEATURES
# ============================================================================
[features]
default = []
# Full damage region tracking with advanced comparison
damage = []
# Enable all optional features
full = ["damage"]

# ============================================================================
# LINTS (manual - requires numeric cast overrides for video processing)
# Video processing requires extensive numeric conversions for stride
# calculations, pixel format conversion, and damage region handling.
# ============================================================================
[lints.rust]
unsafe_code = "warn"
elided_lifetimes_in_paths = "warn"
single_use_lifetimes = "warn"
unreachable_pub = "warn"

[lints.clippy]
# Numeric casts - ALLOWED for video processing code
as_conversions = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"

# Correctness
unwrap_used = "warn"
panic = "warn"

# Style and readability
similar_names = "warn"
wildcard_imports = "warn"

# Performance
large_futures = "warn"
rc_buffer = "warn"
or_fun_call = "warn"

# Relaxed lints
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_range_loop = "allow"

# ============================================================================
# DEPENDENCIES
# ============================================================================
[dependencies]
# PipeWire frame types (VideoFrame, PixelFormat, DamageRegion)
lamco-pipewire = { path = "../lamco-pipewire", version = "0.4.0" }

# Async runtime
tokio = { version = "1", features = ["sync", "rt", "time"] }

# Logging
tracing = "0.1"

# Error handling
thiserror = "1.0"

# Concurrency
parking_lot = "0.12"

[dev-dependencies]
tokio = { version = "1", features = ["sync", "rt", "time", "macros", "rt-multi-thread"] }
tracing-subscriber = "0.3"
