Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 887 Bytes

README.md

File metadata and controls

50 lines (35 loc) · 887 Bytes

Tower Defense RUST

Works both in-browser (thanks to WASM) and as a desktop version (OpenGL) on Mac, Windows and Linux.

Web version

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

Desktop

Mac

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

Linux & Windows

Desktop version can be also tested on Windows with Windows-Subsystem-For-Linux.

Start

cd rust
cargo build
./target/debug/desktop