C++ library for portable GPU computation using WebGPU
Top 12.8% on sourcepulse
gpu.cpp provides a C++ library for portable, low-level GPU computation using the WebGPU specification. It targets individual developers and researchers seeking to integrate GPU acceleration into native applications with minimal boilerplate and dependencies, enabling fast iteration cycles across diverse hardware.
How It Works
The library leverages WebGPU as a cross-platform, low-level GPU API, allowing C++ code to run on GPUs from various vendors (Nvidia, Intel, AMD) via Vulkan, Metal, or DirectX backends. It emphasizes a small API surface area and minimal dependencies, offering a header-only C++ interface. For convenience, it bundles a pre-built binary of Google's Dawn WebGPU implementation, avoiding lengthy build times for the WebGPU backend during development.
Quick Start & Requirements
make
from the top-level directory.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
Browser targets are a short-term priority and not yet tested. The library currently lacks a reusable kernel library, with WGSL implementations residing within examples.
2 weeks ago
1 day