Raylib in pure Iron

Every pixel, every shader, every audio frame bound to Iron with exact C ABI. The stdlib exposes raylib as idiomatic Iron across 14 categories: types, input, 2D drawing, collision, textures, text, audio, 3D drawing, models, shaders, math, and files.

5 example programs · Apache 2.0
rotating_cube.iron
import raylib

func main() -> Int32 {
    Window.init(Int32(800), Int32(600), "Rotating Cube")
    Window.set_target_fps(Int32(60))

    var cam = Camera3D(
        Vector3(Float32(10.0), Float32(10.0), Float32(10.0)),
        Vector3(Float32(0.0),  Float32(0.0),  Float32(0.0)),
        Vector3(Float32(0.0),  Float32(1.0),  Float32(0.0)),
        Float32(45.0), CameraProjection.PERSPECTIVE)

    while not Window.should_close() {
        cam = Camera3D.update(cam, CameraMode.ORBITAL)
        Draw.begin()
        Draw.clear(SKYBLUE)
        Draw.begin_mode_3d(cam)
        Draw.cube(origin, size, size, size, RED)
        Draw.grid(Int32(10), Float32(1.0))
        Draw.end_mode_3d()
        Draw.end()
    }
    Window.close()
    return Int32(0)
}
Documentation

Three paths into the binding

Whether you're writing your first Iron window or wiring up a multi-pass shader pipeline, pick the shape of doc that matches the moment.

Getting Started

Install Iron, open a window, then walk through pong, a rotating 3D cube, and a post-FX shader. Every snippet is copied from a real example.

Open the guide →

API Reference

14 categories: Types, Enums, Window, Input, 2D Drawing, Collision, Textures, Text, Audio, 3D Drawing, Models, Shaders, Math, Files. Every function cross-linked to raylib.h and a test.

Browse the reference →

Examples

pong, rotating_cube, model_viewer, post_fx, raylib_showcase: five example programs with full source, screenshots, and notes on when to use each one.

See the gallery →

14 categories, one binding

Every upstream raylib 6.0 function group ships as idiomatic Iron. Jump directly to the category you need.

Build real games in Iron. Starting now.

Install Iron, clone an example, change one line, rebuild. The binding is the whole point, reach for it.