From 4dc748d273bbbd632a5b09e3c021595fa84d406d Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Mon, 21 Sep 2020 20:00:48 +0200 Subject: [PATCH] Update README --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e83d5c..c6ed415 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,30 @@ ## Setup -Install Emscripten -https://puddleofcode.com/story/definitive-guide-to-rust-sdl2-and-emscriptem +- Install Emscripten +``` +# Get the emsdk repo +git clone https://github.com/emscripten-core/emsdk.git +# Enter that directory +cd emsdk + +# Download and install the latest SDK tools. +./emsdk install latest + +# Make the "latest" SDK "active" for the current user. (writes .emscripten file) +./emsdk activate latest + +# Activate PATH and other environment variables in the current terminal +source ./emsdk_env.sh +``` +https://emscripten.org/docs/getting_started/downloads.html + +- Compile SDL2: ``` $ embuilder.py build sdl2 -$ export EMMAKEN_CFLAGS="-s USE_SDL=2" ``` + +References: +- https://puddleofcode.com/story/definitive-guide-to-rust-sdl2-and-emscriptem +