| Crates.io | ringkernel-wgpu |
| lib.rs | ringkernel-wgpu |
| version | 0.4.0 |
| created_at | 2025-12-03 16:07:59.804856+00 |
| updated_at | 2026-01-25 21:24:29.600049+00 |
| description | WebGPU backend for RingKernel - cross-platform GPU support |
| homepage | https://github.com/mivertowski/RustCompute |
| repository | https://github.com/mivertowski/RustCompute |
| max_upload_size | |
| id | 1964404 |
| size | 117,859 |
WebGPU backend for RingKernel.
This crate provides cross-platform GPU compute support for RingKernel via WebGPU (wgpu). It works across Vulkan, Metal, DX12, and browser environments.
Compared to the CUDA backend:
use ringkernel_wgpu::WgpuRuntime;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
if !ringkernel_wgpu::is_wgpu_available() {
eprintln!("No WebGPU adapter found");
return Ok(());
}
let runtime = WgpuRuntime::new().await?;
let kernel = runtime.launch("compute", Default::default()).await?;
// Process messages...
kernel.terminate().await?;
runtime.shutdown().await?;
Ok(())
}
| Type | Description |
|---|---|
WgpuRuntime |
Main runtime implementing RingKernelRuntime |
WgpuAdapter |
GPU adapter handle |
WgpuKernel |
Compiled compute pipeline |
WgpuBuffer |
GPU buffer wrapper |
# Requires WebGPU-capable GPU
cargo test -p ringkernel-wgpu --features wgpu-tests -- --ignored
When targeting WebAssembly, the runtime automatically detects the browser's WebGPU support and configures accordingly.
Apache-2.0