[package]
edition = "2024"
rust-version = "1.98.0"
name = "rightkit-gpu"
version = "0.1.0"
build = false
include = [
"src/**",
"README.md",
"CHANGELOG.md",
"NOTICE",
"LICENSE-MIT",
"LICENSE-APACHE",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
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."
readme = "README.md"
keywords = [
"wgpu",
"gpu",
"device",
"compute",
]
categories = ["graphics"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/bogusyogi/rightkit"
[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"
[lib]
name = "rightkit_gpu"
path = "src/lib.rs"
[dependencies.log]
version = "0.4"
[dependencies.rightkit-fs]
version = "0.4.9"
features = ["fs"]
default-features = false
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.pollster]
version = "1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgpu]
version = "30.0.1"
features = [
"std",
"parking_lot",
"metal",
"vulkan",
"dx12",
"wgsl",
]
default-features = false