Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NimR

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

Quick Start

  • Create a project from the template.
  • Edit nimr.nim and save your changes.
  • Enable GitHub Pages to see your changes live.

Features

  • Built with Nim + naylib + raylib. Super fast compilation, small binaries, readable code.
  • Auto-compiled to WebAssembly using Emscripten.
  • Automatic deployment to GitHub Pages.

Building Locally

Prerequisites

Build for Desktop (Native)

# 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.nim

Build for Web (WASM)

Prerequisites

# 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 8080

Project Structure

nimr/
├── 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

License

MIT License - see LICENSE for details.

About

Dead simple raylib example in Nim compiled to wasm.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages