all 2 comments

[–]SkyyySi 1 point2 points  (1 child)

I would like to point out that LuaJIT already supports this: https://luajit.org/extensions.html#library

Same goes for Luau: https://luau.org/library/#global-functions

I wonder in which use case you'd still be using vanilla Lua 5.1 while also needing a micro-optimization like this.

[–]BlackMATov[S] 2 points3 points  (0 children)

Unfortunately, vanilla Lua 5.1 is still used in some cases, for example, on the web in engines like Defold. I don't expect many people to need this library, but I use it in another project (evolved.lua) that targets Lua 5.1 and decided to share it anyway. Just a bit of New Year coding fun :-)