Latest Guides
View all →Working with Binary Data in Lua 5.3+
Serialize and deserialize binary data using string.pack, unpack, and packsize. Covers format specifiers, endianness, and common pitfalls.
LuaJIT FFI: Calling C from Lua
Learn how LuaJIT's FFI library lets you call C functions and use C data structures directly from Lua without writing extension modules.
Parsing with LPeg and re
Parse structured text using LPeg, a PEG-based parsing library that ships with Lua 5.2+, and its companion re module.
TCP and HTTP with LuaSocket
Learn to use LuaSocket for TCP client/server sockets, HTTP requests, URL parsing, and common networking patterns in Lua.
Parsing and Generating JSON in Lua
Learn how to parse and generate JSON in Lua using dkjson, cjson, and json.lua with practical examples and common gotchas.