[workspace]
members = [".", "prgpu-macro"]

[package]
name = "prgpu"
version = "0.1.4"
edition = "2024"
description = "GPU-accelerated rendering utilities for Adobe Premiere Pro and After Effects plugins"
license = "MIT OR Apache-2.0"
keywords = ["gpu", "video", "after-effects", "premiere", "rendering"]
categories = ["graphics", "multimedia::video", "rendering"]
readme = "README.md"
repository = "https://github.com/Exaecut/prgpu"
homepage = "https://github.com/Exaecut/prgpu"
documentation = "https://docs.rs/prgpu"
include = [
    "src/**",
    "shaders/**",
    # Vendored snapshot of Exaecut/vekl — lets prgpu's own built-in shaders
    # (mip_downsample etc) `import vekl;` when the crate is consumed from
    # crates.io. The authoritative vekl lives at Exaecut/vekl; this copy is
    # refreshed before each publish by scripts/sync-vekl.sh (see README).
    "vekl/**/*.slang",
    "vekl/LICENSE",
    "vekl/README.md",
    "build.rs",
    "Cargo.toml",
    "README.md",
    "LICENSE-MIT",
    "LICENSE-APACHE",
    "docs/**",
]

[features]
default = ["cargo-clippy"]
cargo-clippy = []
shader_hotreload = ["cudarc/nvrtc"]
build = ["dep:cc", "dep:serde", "dep:serde_json", "dep:ureq", "dep:tar", "dep:flate2"]
timing = []
bench = ["dep:criterion"]

[dependencies]
log = { version = "0.4", features = ["release_max_level_trace", "max_level_trace"] }
# Adobe SDK bindings (Exaecut fork of virtualritz/after-effects). We publish
# under `exaecut-*` names because the upstream names are already taken on
# crates.io by virtualritz. `[lib] name` inside each crate preserves the
# existing `use after_effects::...` / `use premiere::...` paths.
exaecut-after-effects = "0.5"
exaecut-premiere = "0.5"
bytemuck = { version = "1.23.1", features = ["derive", "min_const_generics"] }
parking_lot = "0.12.3"
paste = "1.0.15"
rayon = "1.10"
prgpu-macro = { version = "0.1.0", path = "prgpu-macro" }
cc = { version = "1", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
ureq = { version = "3", optional = true }
tar = { version = "0.4", optional = true }
flate2 = { version = "1", optional = true }
criterion = { version = "0.8.2", default-features = false, features = ["cargo_bench_support", "html_reports"], optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2.7"

[target.'cfg(target_os = "windows")'.dependencies]
cudarc = { version = "0.19.3", default-features = false, features = ["std", "driver", "fallback-dynamic-loading", "cuda-13010"] }
opencl3 = "0.12.1"

[build-dependencies]
# Reused by prgpu's own build.rs to compile the built-in shaders
# (mip_downsample, etc.) into prgpu's OUT_DIR. The `build` feature in
# `[features]` covers the same deps for effects that call into
# `prgpu::build::compile_shaders` from their own build.rs.
cc = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
ureq = "3"
tar = "0.4"
flate2 = "1"

[target.'cfg(target_os = "windows")'.build-dependencies]
cudarc = { version = "0.19.3", default-features = false, features = ["std", "driver", "nvrtc", "fallback-dynamic-loading", "cuda-13010"] }
opencl3 = "0.12.1"

[target.'cfg(target_os = "windows")'.dev-dependencies]
cudarc = { version = "0.19.3", default-features = false, features = ["std", "driver", "fallback-dynamic-loading", "cuda-13010"] }
opencl3 = "0.12.1"

[dev-dependencies]
trybuild = "1"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(shader_hotreload)", "cfg(does_dialog)", "cfg(with_premiere)", "cfg(threaded_rendering)"] }