wgmath is a set of Rust libraries exposing re-usable WebGPU shaders for scientific computing including:
- The wgcore crate, a centerpiece of the wgmath ecosystem, exposes a set of proc-macros to facilitate sharing and composing shaders across Rust libraries.
- Linear algebra with the wgebra crate.
- AI (Large Language Models) with the wgml crate.
- Collision-detection with the wgparry2d and wgparry3d crates (still very WIP).
- Rigid-body physics with the wgrapier2d and wgrapier3d crates (still very WIP).
By targeting WebGPU, these libraries run on most GPUs, including on mobile and on the web. It aims to promote open and cross-platform GPU computing for scientific applications, a field currently strongly dominated by proprietary solutions (like CUDA).
See the readme of each individual crate (on the crates
directory) for additional details.