Rust/SDL2 project template that can compile for both native and web targets.
- Install Emscripten
- Activate Emscripten (
source ./emsdk_env.sh
) - Run
./dev_server
to compile and set up a little webserver.
It'll automatically recompile and host whenever you make changes in ./src
.
Run cargo run
This project is designed so that you can clone this repo, delete ./src/game.rs
, tweak ./src/index.html
, and drop in your own game code. Have fun!