[package]
name = "rightkit-gpu"
version = "0.1.0"
edition = "2024"
rust-version = "1.98.0"
description = "Shared wgpu device context for Right Suite apps: per-OS backend policy, a crash sentinel around device creation, adapter pick and limits, an exit gate for in-flight GPU work, and a device-memory budget that adapts to out-of-memory."
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/bogusyogi/rightkit"
keywords = ["wgpu", "gpu", "device", "compute"]
categories = ["graphics"]
include = ["src/**", "README.md", "CHANGELOG.md", "NOTICE", "LICENSE-MIT", "LICENSE-APACHE"]
[package.metadata.rightkit]
continuous = "held-resource"
[[package.metadata.rightkit.resources]]
api = "GpuContext::create"
file = "src/context.rs"
holds = ["memory"]
scale = "one wgpu instance, adapter, device and queue per context the app creates (an app creates one); the driver holds device memory until the context is dropped"
release = "drop of the GpuContext; GpuGate::begin_shutdown and wait_idle end in-flight work first"
static_note = "MARKER (one Mutex-guarded sentinel path and a counter) and GATE (one Mutex and Condvar) are single values, not collections; they cannot grow"
[[package.metadata.rightkit.resources]]
api = "MemoryBudget::admit"
file = "src/budget.rs"
holds = ["thread"]
scale = "a caller waiting in admit blocks its own thread on a Condvar with a 100 ms timeout; the queue holds one ticket per waiting caller"
release = "the Permit drop, or admit returning None when the caller's stop closure turns true"
[dependencies]
log = "0.4"
rightkit-fs = { version = "0.4.9", path = "../rightkit-fs", default-features = false, features = ["fs"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wgpu = { version = "30.0.1", default-features = false, features = ["std", "parking_lot", "metal", "vulkan", "dx12", "wgsl"] }
pollster = "1"