Martin Helmut Fieber

Series: Lua

An article series about different aspects of Lua and the surrounding ecosystem. This is not about learning the language itself, there are far better resources for this, like the book Programming in Lua or the LuaUsers tutorial directory.

The series can be read one after the other, as every article builds on the one before, or jumped directly into a topic as desired in any order. In either case, the companion repository on GitHub will be available to take a look at the whole setup, from the latest commit or on a per-article basis, available as branches.

At the end of this page are also some useful links, gathered throughout the article series.

Part 1: Lua project setup with LuaRocks

Posted on

Showing a VS Code window in dark mode with an open Lua file and the sidebar on the left showing the contained project files that get built up in the series.

Setting up a project with Lua, running code, installing dependencies, code formatting, and static analysis, as well as the editor setup.

Part 3: How to test your Lua

Posted on

Showing a VS Code window in dark mode, a Lua file open with showing test code written with LuaUnit. A sidebar on the left, showing the project files that get built in this part of the series.

Besides quick iterations on the command-line, having a test suite for Lua will be crucial for any serious project. This article will also cover mocking and a continuous integration setup.

Part 4: Debugging and profiling Lua

Posted on

Part of the Chrome tracer UI showing a colorful flame graph created with a Lua tracer.

Even with a good test suite, debugging will be necessary, sooner or later. This article will go in depth into debugging Lua, including how to profile a Lua application.

Part 5: C++ and Lua

Posted on

Showing a VSCodium window in dark mode, a C++ file open with some Lua library C-API code. At the bottom the CMake file for the project. The sidebar on the left, showing the contained project files that get built in this part of the series.

Lua being an "extensible extension language", it is perfect to extend and customise applications. This article will look at integrating Lua, accessing data, defining functions and modules, and much more.

Part 6: CLI applications with Lua

Coming soon

All about writing an own command-line application in Lua, parsing arguments, taking user input, and showing a continues state in the terminal.

Part 7: Mono-repo setup with Lua

Need to wait a bit longer

Growing applications have growing needs. This will cover how to manage those, with multiple projects inside one repository.

Part 8: Publishing modules written in C with LuaRocks

On the horizon

LuaRocks supports not only uploading rocks written in Lua, but C as well. Here I will show how to create a C-Rock, build and publish, and how to manage platform specific code.

Part 9: Luac

Behind the moon

...

Part 10: Lua Sandbox

Above the stars

...

Bonus: Luau

In a galaxy far far away

...

References

← Show all blog posts