Port/new version of a falling sand sim I first started working on in Javascript, now written in Rust.
You can play with the web version here
Or clone the repo and build it yourself, assuming you have installed cargo (through rustup), just run:
cargo run --release
Rendering and interaction is performed using macroquad. The UI is made with egui via egui-macroquad.
Inspiration is drawn from various similar falling sand sims, including Powder Toy and Noita. The Exploring the Tech and Design of Noita talk from GDC 2019 is very helpful, as well as this video which explains how one might implement some of these techniques. Sandspiel also provided some insight into how to make this work in Rust specifically (I've tried to avoid looking too hard at it so I could figure some things out on my own, but some parts of the structure of the code are heavily inspired by it).