A Conway’s Game‑of‑Life implementation written in Rust with the Dioxus UI framework.
Live demo: https://dioxus-game-of-life.eusoj.dev/
-
Rust toolchain – install via rustup.
-
Dioxus CLI
cargo install dioxus-cli
git clone https://github.com/josueggh/rust-dioxus-game-of-life
cd rust-dioxus-game-of-lifedx serve # Web build
# OR
dx serve --platform desktop # Desktop build-
Web (WASM + static assets):
dx build --release
-
Desktop (native binary + assets):
dx build --platform desktop --release
Cargo resolves all dependencies automatically – nothing else to install.
Open src/main.rs and tweak the constants at the top of App:
let mut universe = use_signal(|| Universe::new(128, 128)); // width × height
let cell_size = 4; // px per cell
const BASE_DELAY: u64 = 50; // ms between ticksChange them, hit save, and dx serve hot‑reloads instantly.
If the cargo install dioxus-cli step fails with an openssl-sys build
error, point Cargo to the correct directories and retry:
brew --prefix openssl@3
OPENSSL_LIB_DIR=$(brew --prefix openssl@3)/lib \
OPENSSL_INCLUDE_DIR=$(brew --prefix openssl@3)/include \
cargo install dioxus-cliThis project is licensed under the MIT License. See LICENSE for details.