Learn how to use Lua MQTT to connect IoT devices. Covers pub/sub patterns, QoS levels, retained messages, will messages, and production deployment checklists.
Latest guides
View all →- Lua MQTT: Connecting IoT Devices with Lightweight Messaging luaguides.dev/guides
- Cross-Platform Scripting with Lua luaguides.dev/guides
Cross-platform scripting with Lua: handle paths, line endings, and environment variables on Windows, macOS, and Linux. Write portable scripts that run anywhere.
- Dependency Management Patterns in Lua luaguides.dev/guides
Master Lua dependency management with luarocks, submodule imports, and inline bundles. Find the right approach for your project size and deployment target.
- Event Systems and Message Passing in Lua luaguides.dev/guides
Build event systems in plain Lua: callbacks, publish-subscribe, message queues, coroutines, and OpenResty request handling.
- Logging Patterns and Frameworks in Lua luaguides.dev/guides
Explore practical logging patterns for Lua: add timestamps and log levels, write to files, use LuaLogging for advanced needs, and build a structured logger.
Reference
View all →| Name | Section | Description |
|---|---|---|
math.floor | Math Functions | Round a number down to the largest integer less than or equal to it, with integer-vs-float return behavior in Lua 5.4. |
math.max | Math Functions | math.max returns the largest of two or more numbers in Lua 5.4, with integer and float subtype rules, type coercion, and edge-case behavior. |
math.abs | Math Functions | `math.abs` returns the absolute value of a number in Lua 5.4. Preserves the integer/float subtype, handles math.mininteger safely, coerces numeric strings. |
math.ceil | Math Functions | math.ceil rounds a number up to the smallest integer greater than or equal to it in Lua 5.4, with notes on integer/float subtypes and negative values. |
table.maxn (deprecated) | Table Methods | table.maxn returns the largest positive numeric key in a table. Deprecated in Lua 5.2, removed in 5.3; use # or a pairs() loop. |
table.pack | Table Methods | table.pack captures Lua varargs into a table with an n field that preserves the true argument count even when values are nil. |
Tutorial series
View all →Latest articles
View all →- Why Lua docs work best with minimal complete snippets luaguides.dev/articles
How Lua docs work best with minimal complete snippets — small, runnable examples that teach real patterns without framework noise or extra scaffolding.