Hacker News new | ask | show | jobs
by raincole 206 days ago
How easy is it to integrate wgpu if the rest of your game is developed with a language that isn't rust? (e.g. C# or C++)
3 comments

Very! there are unified headers and a C library that the maintainers have written as a wrapper around the library.

https://github.com/gfx-rs/wgpu-native

https://github.com/eliemichel/WebGPU-Cpp

wgpu is the name of the Rust library, but it pretty closely follows the WebGPU spec, which you can easily use from C or C++ via Google's `dawn` library. It provides C bindings as well as a templatized C++ API.
Webgpu.h is, AIUI, part of the webgpu spec. Both Dawn (Google’s C++ implementation used in Chrome) and wgpu (Mozilla’s implementation used in Firefox) can be used as concrete implementation of those headers.