vyre-wgpu
wgpu backend for vyre IR — implements vyre::VyreBackend on any wgpu-capable GPU (Vulkan, DX12, Metal, WebGPU).
cargo add vyre vyre-wgpu
Example
use Program;
use ;
use WgpuBackend;
let backend = acquire.await?;
let program: Program = my_program;
let inputs: & = &;
let config = default;
let outputs: = backend.dispatch?;
Features
- Pipeline cache — reuses compiled WGSL pipelines across dispatches by content hash.
- Buffer pool — reuses GPU buffer allocations across dispatches.
- Tiered validation cache — three-level cache for repeated shader validation.
- Lowering happens internally. Consumers never pass WGSL strings; the crate lowers
Programto WGSL viavyre::lower::wgsl::emit.
Requirements
- A wgpu-capable GPU. This crate does NOT silently fall back to CPU. Absence of a GPU is surfaced as an error, not a degradation.
wgpu = 24.x. Pinned — major wgpu version bumps are a vyre-wgpu major bump.
MSRV
Rust 1.85.
License
MIT OR Apache-2.0.