Skip to content
visitor
@
backend-development.net
:~$
ls ./posts
posts
about
login
backend-development.net
Field notes on ethical hacking, security research & exploitation.
filtered by tag
gamedev
clear
0x0001
2026-07-24
24 views
Lua 5.1 C API — Functions, Metatables, and the Stack
A complete reference for embedding Lua 5.1 in C++. Covers the stack, type system, registering functions and libraries, reading and writing variables, closures with upvalues, metatables with all metamethods, full userdata with GC, the registry, sandboxing, coroutines, and safe error handling — with working code examples throughout.
lua
c++
embedding
scripting
gamedev
reverse-engineering
lua-api
metatables
userdata