I made this fork because the release mode non-stripped libwgpu_native.a file is 48MB! This is huge, and I know we can do much better.
Right now this fork is only made for my specific particle simulation project, and only builds for x86_64-unknown-linux-gnu, but I plan to make it compile for wasm and windows.
- Update dependencies
- Move headers from
ffi/webgpu-headers/toffi/webgpu/for compatibility with sdl3webgpu - Only enable
wgslfeature by default -> From 48MB to 41MB - Enable more generic optimizations for release mode -> From 41MB to 16MB
- Enable nightly features -> From 16MB to 7.4MB
- Enable nightly flags -> From 7.4MB to 5.6MB
- Strip symbols from release mode -> From 5.6MB to 3.9MB
We got a 91% reduction in size!
This is a native WebGPU implementation in Rust, based on wgpu-core.
The bindings are based on the WebGPU-native header found at ffi/webgpu/webgpu.h and wgpu-native specific items in ffi/wgpu.h
- gfx-rs/wgpu-rs - idiomatic Rust wrapper with a few more examples to get a feel of the API
- pygfx/wgpu-py - Python wrapper
- trivaxy/wgpu.NET - Raw .NET bindings with optional wrappers
- dotnet/Silk.NET - Raw .NET bindings
- Alimer.Bindings.WebGPU - Cross platform .NET bindings for WebGPU
- wgpu.cr - Crystal wrapper
- bindc-wgpu - D wrapper (package)
- porky11/wgpu - experimental Scopes wrapper
- cshenton/WebGPU.jl - experimental Julia wrapper
- dvijaha/WGPUNative.jl - stable Julia wrapper
- kgpu/wgpuj - Java/Kotlin wrapper
- wgpu4k/wgpu4k / wgpu4k/wgpu4k-native - Kotlin/Multiplatform wrappers
- karmakrafts/Multiplatform wgpu - Kotlin/Native wrapper
- rajveermalviya/go-webgpu - Go wrapper
- WebGPU-C++ - Auto-generated C++ wrapper (developed for the Learn WebGPU native course)
- jai_wgpu_native - Raw Jai bindings
- WebGPU::Direct - Perl wrapper (package)
- bronter/wgpu_native_zig - Zig wrapper
Automated 32 and 64-bit builds for MacOS, Windows and Linux are available as Github releases. Details can be found in the Binary Releases page in the wiki.
This repository contains C-language examples that link to the native library targets and perform basic rendering and computation. Please refer to our Getting Started page at the wiki for more information.
There's also a (small) contributor guide.