finds.dev← search

// the find

gen2brain/raylib-go

★ 2,547 · C · Zlib · updated Aug 2026

Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.

Go bindings for raylib, the C game library. You get the full raylib API in Go, either compiled in via cgo (C source embedded and built with your binary) or via purego, which calls the prebuilt shared libraries with no C compiler needed. Good fit for anyone who wants a simple 2D/3D game loop in Go without hand-rolling cgo bindings themselves.

The purego path is the real draw — on Linux/macOS/Windows/FreeBSD you can set CGO_ENABLED=0 and it still works by loading embedded shared libraries at runtime, which matters for anyone who wants trivial cross-compilation or doesn't want a C toolchain in their build pipeline. Build tags cover a wide range of backends (SDL, SDL3, RGFW, DRM for Raspberry Pi, multiple GL versions) so it's not locked to GLFW/desktop OpenGL. Examples are organized module-by-module exactly like upstream raylib (core, shaders, models, physics, audio, gui), which makes porting a raylib tutorial or cheatsheet entry over almost mechanical.

The cgo path (the default) still needs Mesa/X11/Wayland dev headers on Linux and a real C compiler everywhere else, and the first build compiles the embedded raylib C source from scratch, which the README admits takes several minutes — annoying for CI cold starts. There's no version pinning or compatibility table for which raylib C release each bindings version tracks, so you're trusting that upstream raylib and this wrapper haven't drifted apart on some function signature. Wasm support isn't actually in this repo — it's pushed off to a separate third-party fork (Raylib-Go-Wasm) that's only 'largely compatible,' so web targets are second-class and unverified by the maintainer. 32-bit is unsupported on the purego path, which rules it out for some embedded/Pi use cases that otherwise fit the DRM build tag's audience.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →