IT lexicon › Infra & Ops › Kernel Lua (NetBSD)

Kernel Lua (NetBSD)

Infra & Ops På svenska → Updated: 2026-11-09

NetBSD's support for running Lua scripts inside the kernel, for prototyping and tweaking without a rebuild.

Marc Balmer championed the idea, and in 2013 a Lua interpreter was imported into the NetBSD kernel, shipping with NetBSD 7.0 in 2015. From userland you create states and load scripts with luactl through the lua(4) device, and kernel modules can expose their own functions to scripts. Since the kernel avoids floating point, kernel Lua works with integers only.

The pitch was to let drivers and policy be prototyped in a scripting language rather than C, shortening the path from idea to test. Uptake has stayed modest — persuading kernel developers to let an interpreter in is an uphill job — but kernel Lua is a clear forerunner of what eBPF later made popular on Linux: runnable logic in the kernel without rebuilding it.

← Back to the lexicon