raylib icon

raylib

Standard softwareFOSS · zlib

Simple, zero-dependency C99 library for 2D and 3D games

Free (zlib) · Ramon Santamaria (raysan5) · Standard software workflow; Steam AI disclosure does not apply.

AI
Standard
IP
Commercial-Safe IP
Engines
Any Engine, Web / JS
Platforms
Windows · macOS · Linux · Web · CLI
Version
5.5
Technical Summary

raylib is a zero-dependency open-source C99 game programming library created by Ramon Santamaria under the permissive zlib license. Completely free for commercial use with zero royalties, it delivers hardware-accelerated 2D and 3D OpenGL rendering, glTF skeletal animation loading, shaders, and spatial audio across Windows, Linux, macOS, WebAssembly, and 60+ language bindings.

Technical Overview

Architecture and Production Workflow

raylib (5.5) rejects complex C++ class hierarchies, template metaprogramming, and external dependency managers in favor of a single, readable C99 header (raylib.h) backed by self-contained single-file libraries: rlgl.h (an immediate-style OpenGL abstraction supporting OpenGL 1.1 through 4.3, OpenGL ES 2.0/3.0, and WebGL), raymath.h (inline vector/matrix/quaternion SIMD-friendly math), and miniaudio.h (cross-platform PCM, WAV, OGG, MP3, and QOA spatial audio). A clean CMake, Zig, or single-line cc invocation compiles an entire hardware-accelerated 2D/3D game from scratch in under five seconds.

Out of the box, raylib loads PNG/DDS/KTX/ASTC textures, sprite fonts and SDF TrueType fonts, custom GLSL vertex/fragment post-processing shaders, render textures, and 3D skeletal meshes in .glb/.gltf, .iqm, .m3d, and .obj formats with GPU or CPU skinning and hardware instancing (DrawMeshInstanced). Because its ABI is pure C99, raylib has become the foundational graphics layer for systems programmers working in Odin (vendor:raylib ships built right into the Odin compiler), Zig, Rust, C# (Raylib-cs), Go, and Lua, alongside raygui for building custom in-house level editors and debug overlays.

Pricing, Licensing, and Commercial Rights

raylib is 100% free and open source under the zlib/libpng license ($0 seat cost, 0% royalties, zero attribution bloat). Commercial studios can statically link raylib into closed-source proprietary Steam, mobile, embedded arcade, and Emscripten HTML5 binaries without disclosing any source code. Developer Ramon Santamaria optionally sells standalone indie asset utilities (rFXGen, rTexPacker, rGuiStyler) on itch.io/Steam, which carry permissive commercial output rights as well.

Strengths and Tradeoffs in Studio Pipelines

Pipeline DimensionProduction StrengthPractical Limitation
Build SimplicityZero external DLL/PkgConfig hell; statically links into tiny 1-3 MB native binariesImmediate-mode API leaves scene graphs, ECS, asset caching, and serialization up to your code
Multi-Language ReachFirst-class zero-overhead C ABI built directly into Odin and mature in Zig, C#, and C/C++No built-in 2D/3D physics engine (pair with Box2D v3, Chipmunk2D, or JoltC)
Custom Toolingraygui + rlImGui (Dear ImGui bridge) make writing bespoke studio level editors fastClosed console targets (PS5, Switch, Xbox) require replacing the OpenGL rlgl backend with proprietary graphics wrappers

Combine Odin (or C99/C++) + raylib + Box2D v3 + LDtk JSON + Dear ImGui (rlImGui) for a rock-solid, sub-second-compile indie stack free from engine upgrades or editor crashes.

AI Transparency & Steam Disclosure

Standard Software

Procedural math, physics, or manual authoring software.

Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.

Technical FAQ about raylib

Which programming languages work best with raylib for commercial indie games?
Pure C99/C++17, Odin, Zig, and C# (`Raylib-cs` on .NET 8 NativeAOT) are the four most popular commercial stacks. Notably, the Odin programming language ships `vendor:raylib` directly inside its standard compiler distribution, allowing zero-setup cross-platform builds out of the box.
Does raylib support 3D glTF skeletal animations and custom shaders?
Yes. raylib 5.x natively parses `.glb` and `.gltf` 2.0 files via `cgltf`, supporting PBR material maps, node hierarchies, and bone-deformed skeletal animations (`LoadModelAnimations`), alongside custom GLSL vertex/fragment shaders, cubemaps, shadow map render targets, and instanced mesh drawing.
Can raylib compile games to HTML5 WebAssembly for itch.io and browser play?
Yes. Compiling your C, C++, Odin, or Zig raylib source against Emscripten (`PLATFORM_WEB`) translates `rlgl` calls directly to WebGL 2.0 and Web Audio, outputting a compact `.wasm` + `.data` bundle ready for itch.io or self-hosted web portals.

More tools like raylib