A declarative UI framework for Odin with a React-like API, built on Clay and Raylib.
- Odin compiler
- Raylib (installed via Homebrew on macOS:
brew install raylib, or bundled with Odin)
rune/
├── cli/src/ # CLI tool
├── src/ # Rune package (vendor this folder)
│ ├── rune.odin # Framework API
│ ├── clay/ # Clay layout engine
│ └── clay_renderer/ # Raylib renderer
├── Makefile
├── ARCHITECTURE.md
└── README.md
make cli # Debug build
make cli-release # Release build
make clean # Remove build artifacts
make help # Show available targetsThe CLI binary will be output to build/rune.
rune <command> [options]
COMMANDS:
new <name> Create a new rune project
init Initialize rune in current directory
run Build and run the project
build Build the project
help Show help message
version Show version
OPTIONS:
-r, --release Build in release mode
-t, --target <target> Cross-compile for target platform
(windows, linux, macos, macos-arm64, web)
EXAMPLES:
rune new my-app # Create new project
rune run # Build and run
rune build --release # Release build
rune build -t windows --release # Cross-compile for Windowsrune new my-app
cd my-app
rune runThis creates:
my-app/
├── src/main.odin # Entry point
├── vendor/rune/ # Rune framework (copy from rune/src/)
├── build/ # Build output
├── assets/ # Static assets
├── rune.yml # Project config
└── .gitignore
package main
import "rune"
main :: proc() {
app := rune.create_app({
title = "My App",
width = 900,
height = 700,
})
rune.run(app, render)
}
render :: proc(ctx: ^rune.Context) {
using rune
// Build your UI here
}Rune abstracts two layers:
- Clay - Layout engine (sizing, positioning, hit testing)
- Raylib - Rendering backend (drawing, window, input)
See ARCHITECTURE.md for detailed guidance on:
- When to use Clay vs the Renderer
- Data flow and lifecycle
- Building your component API
The project includes pre-built Clay libraries for:
- Windows (x64)
- Linux (x64)
- macOS (x64 and ARM64)
- WebAssembly
Raylib cross-compilation is handled by Odin's vendor system.
To work on the framework itself:
make cli # Build the CLI
./build/rune --help # Test it
# The framework code lives in src/rune.odinMIT