thin native bindings for raylib 6.0, plus rlgl and raymath.
raylib's full public api is mapped into bindings. value structs stay value structs, strings use the karamel c string type where ownership is clear, and pointer-heavy parts use c.intptr_t instead of hiding unsafe memory behind a fake safe api.
rlgl and raymath are generated from the installed 6.0 headers before each build. that keeps those header-defined apis exact instead of carrying a stale handwritten copy.
requirements: fstar, karamel, raylib 6.0 development headers, pkg-config, a c compiler, and gnu make.
build either example with:
cd example_window
makeor:
cd example_rlgl
makefor your own program, put its fstar source anywhere and run:
python3 bindings/build.py path/to/main.fst path/to/outputset raylib_include if the headers are outside normal pkg-config or include paths. set fstar_exe or krml_exe if those tools use different command names.
resource lifetime is the same as raylib: if raylib says to unload it, unload it. raw pointer values are deliberately raw; they are the escape hatch for callbacks, output buffers, arrays, and custom native interop.