Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veandco/sdl2-webassembly-builder
SDL2 WebAssembly Builder using Docker container
https://github.com/veandco/sdl2-webassembly-builder
Last synced: 11 days ago
JSON representation
SDL2 WebAssembly Builder using Docker container
- Host: GitHub
- URL: https://github.com/veandco/sdl2-webassembly-builder
- Owner: veandco
- Created: 2019-11-02T06:34:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T06:35:28.000Z (about 5 years ago)
- Last Synced: 2024-10-29T21:05:50.174Z (22 days ago)
- Language: C
- Size: 1.95 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SDL2 WebAssembly Builder
![Screenshot](https://github.com/veandco/sdl2-webassembly-builder/raw/master/screenshot.png "Screenshot")
This is a container to build SDL2 programs into WebAssembly so it can be
displayed in a website. It's still very much in-progress and I'm no expert so
any improvement is appreciated!## Usage
The image can be built by running:
```
docker build -t emscripten-sdl2 .
```Then you can make changes to `src/main.c` (and `src/Makefile` if needed).
After that, the WebAssembly can be generated by running:
```
./build.sh
```Finally, you can view the result by running:
```
cd dist
python -m http.server
```__NOTE__: if you have Python 2, use `python -m SimpleHTTPServer` instead.
and go to `http://localhost:8000` in the browser!
## Credits
Many thanks to Michał Kalbarczyk's [blog post](https://puddleofcode.com/story/definitive-guide-to-rust-sdl2-and-emscriptem) which taught me how to compile
SDL2 into WebAssembly.