Programming & Coding
LuaJIT FFI Bindings Tutorial
The FFI built into LuaJIT lets you call C functions and manipulate C data structures from pure Lua — no glue code, no compiler round-trip. This tutorial walks through declarations, structs, pointers, memory ownership, callbacks, and the habits that keep your bindings fast and leak-free.