A minimal, cross-platform WebGPU application built in C++ using the wgpu-native implementation.
A minimal webgpu app in C++ using wgpu-native. This project shows how to create a simple and minimal application with webgpu using wgpu-native implementation in C++. It contains CI / CD that enable to build and run this app on windows, linux and macOS.
- Lightweight Setup: A clean and straightforward boilerplate demonstrating how to initialize and run WebGPU in C++ with:
- GLFW-based window creation
- Simple, standard WebGPU render pipeline
- Renders a basic triangle
- Cross-Platform CI/CD: Automated build and execution pipelines configured for Windows, Linux, and macOS:
- Builds binaries for windows, linux, and macOS on every push
- Packages and publishes build artifacts when a tag is created
- Run app to verify that it is working properly
This project is built using the following core dependencies:
- WebGPU Distribution (v0.2.0, powered by wgpu-native v0.19.4.1)
- GLFW WebGPU Extension (v1.2.0)
Eventually install if missing:
sudo apt-get install -y build-essential cmake libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev
cmake -B build && cmake --build build --parallel && ./build/webgpu_cpp_minimal
