Skip to main content
Version: 4.1

Nauthilus 4.2.0

Published as tag v4.2.0 on November 24, 2026. This page describes the changes since v4.1.3.

Nauthilus 4.2 is a feature release on the v4 line. It keeps the v4 module path, pluginapi.APIVersion, and the configuration roots. It contains every fix of 4.1.3, including the security fix for Lua environment sources; read those notes when you upgrade from 4.1.2 or earlier.

Native plugins

Rebuild every private native plugin against the exact source and Go toolchain of 4.2.0, with the server PGO profile.

Highlights​

  • Lua JIT compiler. Lua runs on gopher-lua-jit, and the pooled Lua VMs compile hot loops to native code. The switch auth.backends.lua.backend.default.jit turns the compiler off.
  • Faster Lua requests. Less work per Lua request; an environment source benchmark needs about half the allocations and memory.
  • Lua Cookbook. Tested, runnable recipes for every Lua interface; see the Lua Cookbook. The recipes found the defects that 4.1.3 and 4.2.0 fix, and they give identical results with the JIT on and off.

Lua engine and JIT compiler​

  • Nauthilus resolves github.com/yuin/gopher-lua through a replace directive to github.com/croessner/gopher-lua-jit v0.2.2, an API-compatible fork with a native JIT compiler for hot loops and a compact table representation. Scripts keep the Lua 5.1 language profile, and third-party Lua libraries build unchanged against the same import path.
  • The pooled VMs of Lua backends, custom hooks, actions, environment sources, and subject sources compile numeric loops and loops over number arrays to machine code on Linux and macOS (amd64 and arm64). Short-lived states, such as generic kind: lua policy providers and registry scripts, keep the interpreter.
  • New setting auth.backends.lua.backend.default.jit (default true). false runs the interpreter only; a change needs a restart. See Lua engine and JIT compiler.
  • pairs visits the array part first, then string keys in insertion order, then all other keys in insertion order.
  • Compiler defects of the previous engine are fixed, for example goto no longer detaches closures from the local variables of the surrounding function, and v = t.x and y assigns nil or false when t.x is falsy.

Action: none is required. If a Lua script behaves differently after the upgrade, compare it with jit: false and check whether it relied on the order of pairs or on one of the fixed compiler defects.

Faster Lua requests​

  • Request modules and stateless host modules are built once per Lua VM instead of once per request.
  • Request tables are created with room for their fields, the preload table is copied only after a change, and a single Lua source is planned without the dependency graph.
  • No tracing spans are started while no OpenTelemetry tracer provider is installed.
  • Together with the compact tables of the new engine, the repository benchmark BenchmarkCallEnvironmentLuaSourceWithSharedModules (an environment source request that loads four bundled shared modules) went from about 1160 allocations and 97.9 KB to 451 allocations and 47.9 KB per request, and from about 217 µs to about 140 µs on the development machine.

Build​

  • Local guardrails and CI require golangci-lint 2.15.0.