Works both in-browser (thanks to WASM) and as a desktop version (OpenGL) on Mac, Windows and Linux.
Install wasmpack if not installed: https://rustwasm.github.io/wasm-pack/installer/.
cd rust
cargo build --workspace --exclude desktop
wasm-pack build wasm
cd wasm
yarn
yarn start
Install required dependencies:
brew install sdl2 sdl2_image sdl2_ttf sdl2_gfx
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
Build and start project:
cd rust
cargo build
./target/debug/desktop
Desktop version can be also tested on Windows with Windows-Subsystem-For-Linux.
cd rust
cargo build
./target/debug/desktop