https://github.com/aronicu/raylib-wasm
A Template for making Odin, Raylib, and WASM (Emscripten) projects
https://github.com/aronicu/raylib-wasm
emscripten odin odinlang raylib template wasm
Last synced: 19 days ago
JSON representation
A Template for making Odin, Raylib, and WASM (Emscripten) projects
- Host: GitHub
- URL: https://github.com/aronicu/raylib-wasm
- Owner: Aronicu
- Created: 2024-12-18T14:04:20.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-04T09:27:35.000Z (9 months ago)
- Last Synced: 2025-01-12T21:12:53.387Z (9 months ago)
- Topics: emscripten, odin, odinlang, raylib, template, wasm
- Language: C
- Homepage:
- Size: 7.86 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raylib WASM
A Template for making Odin, Raylib, and WASM (Emscripten) projects> [!WARNING]
> This repository is now archived, Karl Zylinksi makes a better version of the template you can find it here:
> [https://github.com/karl-zylinski/odin-raylib-web](https://github.com/karl-zylinski/odin-raylib-web)## Features
* Works well in Windows (It probably also works for the other desktop platforms but I didn't test it)
* Logging on WASM Works!## What won't work
* Most of Core Libraries (fmt, os, time, etc.)## Building
### Windows
```batch
.\build.bat
```### WASM
#### Requirements
1. [emsdk](https://emscripten.org/docs/getting_started/downloads.html)> [!NOTE]
> In `build_web.bat`, you need to modify the path to where your `emsdk_env.bat` is located```batch
.\build_web.bat:: For running
cd build_web
python -m http.server
```## Examples
* [Breakout Clone](https://github.com/Aronicu/Breakout) - [Play it here](https://aronicu.github.io/breakout/)
* [LDTK Example](https://github.com/Aronicu/LDTK-Example) - [Play it here](https://aronicu.github.io/ldtk-example/)## References
* [Caedo's raylib_wasm_odin](https://github.com/Caedo/raylib_wasm_odin)
* [Karl Zylinski's Odin Raylib Hot Reload Game Template](https://github.com/karl-zylinski/odin-raylib-hot-reload-game-template/)
* [Building a Web Game in C by Angus Cheng](https://anguscheng.com/post/2023-12-12-wasm-game-in-c-raylib/)