This repository is a 2D N-body simulation of a dynamical system of bodies, under the influence of physical forces such as gravity. The simulation is written completely in Rust with WebGPU and WGSL shading, exported to WebAssembly. We deploy the demo with GitHub Actions.
🔸 Simulations like these are common in astrophysics and are used to understand the evolution of large-scale universal structures.
- Rust
- trunk (
cargo install trunk
) - wasm32-unkown-unknown (
rustup target add wasm32-unknown-unknown
)
- Run:
trunk serve
- Preview:
http://localhost:8080/
This project is dual-licensed under both Apache 2.0 and MIT licenses.