Crate ringkernel_wgpu

Crate ringkernel_wgpu 

Source
Expand description

WebGPU Backend for RingKernel

This crate provides cross-platform GPU support via WebGPU (wgpu). Works on Vulkan, Metal, DX12, and browser environments.

§Features

  • Cross-platform GPU access (Windows, macOS, Linux, Web)
  • Event-driven execution model (WebGPU limitation)
  • WGSL shader language support

§Limitations

  • No true persistent kernels (WebGPU doesn’t support cooperative groups)
  • No 64-bit atomics in WGSL
  • Event-driven execution only

§Example

use ringkernel_wgpu::WgpuRuntime;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let runtime = WgpuRuntime::new().await?;
    let kernel = runtime.launch("compute", Default::default()).await?;
    kernel.activate().await?;
    Ok(())
}

Modules§

stub 🔒

Structs§

WgpuRuntime
Stub WebGPU runtime when wgpu feature is disabled.

Constants§

RING_KERNEL_WGSL_TEMPLATE
WGSL shader template for ring kernel.

Functions§

is_wgpu_available
Check if WebGPU is available at runtime.