Unreal Majid
Build a high-performance GPU particle system from scratch using Rust, wgpu, and WebAssembly.
GPU Compute
Simulate millions of particles in real-time using WGSL compute shaders.
WebAssembly
Run your Rust code natively on desktop and in the browser via WASM.
Interactive
Fly-cam controls, gravity toggling, and mouse interaction physics.
Pure Rust
Built with safe, idiomatic Rust using the modern wgpu ecosystem.
What You Will Build
In this tutorial, we will construct a complete particle physics engine. You'll learn how to set up a winit window, initialize a WebGPU device, write compute shaders to handle physics on the GPU, and render the results efficiently. The final result is a standalone application that compiles to a native binary and a web-ready WASM module.
Check out the live running version of what you're about to build: Launch Demo
Prerequisites
- Basic Rust knowledge: Familiarity with syntax, structs, and ownership.
- Modern Browser: Chrome, Edge, or Firefox (with WebGPU enabled).
- Tools installed:
- Rust (via rustup)
- Python 3 (for local web server)
- Git