Skip to content

lucascompython/wgpu-native

 
 

Repository files navigation

Fork Changes

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/ to ffi/webgpu/ for compatibility with sdl3webgpu
  • Only enable wgsl feature 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!

wgpu-native

Matrix Build Status

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

Bindings

Pre-built binaries

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.

Usage

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.

About

A fork of wgpu-native focused on enabling additional compile-time optimizations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 90.7%
  • C 4.2%
  • Python 2.4%
  • Makefile 2.4%
  • Meson 0.3%