Simple animated raylib example in Nim compiled to WebAssembly for easy deployment on GitHub Pages. No need to install anything, GitHub Actions take care of everything.
Check it out live: Demo
- Create a project from the template.
- Edit nimr.nim and save your changes.
- Enable GitHub Pages to see your changes live.
- Built with Nim + naylib + raylib. Super fast compilation, small binaries, readable code.
- Auto-compiled to WebAssembly using Emscripten.
- Automatic deployment to GitHub Pages.
Prerequisites
- Nim (2.0+)
# Install Nim
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
# Install dependencies
nimble install naylib -y
# Build for desktop
nim c -d:release nimr.nimPrerequisites
# Install dependencies
nimble install naylib -y
# Build for web (output in docs/)
nim c -d:emscripten nimr.nim
# Serve locally (optional)
cd docs && python3 -m http.server 8080nimr/
├── src/
│ └── nimr.nim # Main application source
├── web/
│ └── shell.html # HTML template for WASM
├── docs/ # Generated WASM output (GitHub Pages)
├── nim.cfg # Nim configuration
├── nimr.nimble # Package definition
└── .github/workflows/
└── deploy.yml # CI/CD workflow
MIT License - see LICENSE for details.