← ziglang.inraylib-zigGitHub

raylib, ported to Zig

raylib-zig is raylib 6.2 rewritten in Zig. It exports the same C API, so a C program written for raylib links against it unchanged. On top of that it has a Zig API in raylib's own style.

For every upstream example that can run deterministically, the Zig library renders a final frame byte-identical to C raylib (217 of 217, on Linux, desktop GLFW, OpenGL 3.3). How that is checked.

Try it

This is raylib's first example, basic window, written with the Zig API and compiled to WebAssembly. What runs is the Zig port, not C raylib.

Runs the Zig port in your browser (WebGL 2).

All 227 examples, each with its Zig and C source side by side.