From 5b7422a13653213f10de6969caae76372ef45dea Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 8 Jan 2026 14:23:02 +0300 Subject: [PATCH 1/2] fix: Use Lua 5.5 compatible for loop syntax --- src/luarocks/build/rust-mlua.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/luarocks/build/rust-mlua.lua b/src/luarocks/build/rust-mlua.lua index 1ce9913..9ca3638 100644 --- a/src/luarocks/build/rust-mlua.lua +++ b/src/luarocks/build/rust-mlua.lua @@ -73,6 +73,9 @@ function mlua.run(rockspec, no_install) fs.make_dir(dir.dir_name(libdir)) for mod, rustlib_name in pairs(rockspec.build.modules) do + -- Make loop variable mutable in Lua 5.5 + local mod + -- If `mod` is a number, then it's an array entry if type(mod) == "number" then mod = rustlib_name From 4302d575ce7c0ca8f634e59f7ebf4cbdeb4ca1b2 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 8 Jan 2026 14:23:02 +0300 Subject: [PATCH 2/2] feat: Add Lua 5.5 to feature handling passed to mlua --- src/luarocks/build/rust-mlua.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/luarocks/build/rust-mlua.lua b/src/luarocks/build/rust-mlua.lua index 9ca3638..f37166b 100644 --- a/src/luarocks/build/rust-mlua.lua +++ b/src/luarocks/build/rust-mlua.lua @@ -16,7 +16,9 @@ function mlua.run(rockspec, no_install) local lua_version = cfg.lua_version -- Activate features depending on Lua version - if lua_version == "5.4" then + if lua_version == "5.5" then + table.insert(features, "lua55") + elseif lua_version == "5.4" then table.insert(features, "lua54") elseif lua_version == "5.3" then table.insert(features, "lua53")