[Feature request] LuaJit as optional Lua engine for LuCI

It would be nice to have selectable LuaJit as optional Lua engine for LuCI in menuconfig.

I find LuCI too slow…

That's why, some time ago I've built LuaJit on my poor mipsel-based RT-N16 @ OpenWRT 19 and compared 3000x3000 pixel Mandelbrot calculation with vanilla Lua.

Lua calculation was finished in 1543.4 seconds
LuaJit calculation was finished in 501.6 seconds

LuaJit is a great piece of software. I'm not sure if it'll help much in this case but it certainly should enable more functionality in general.

1 Like

Luci in the process of being migrated to a client-side javascript implementation, once finished there will be no lua required anymore.

That makes sense. But the server side must still accept input from client and make changes on the router right? So some server side software will still be required I assume?

Sure, in the form of rpcd (and ACLs governing access).

Gotcha, so then if someone wants to use LuaJit they just provide a script for rpcd to execute per example here:

It seems LuaJit is already available so can be used in such application https://openwrt.org/packages/pkgdata/luajit

It is there is theory, but due to lack of interest by its maintainer, it has failed to compile in buildbot for maybe 1-2 years.
Faillog e.g.


I build LuaJIT as a package just fine on my master branch builds.. I use it for my Snort3/Suricata packages.

root@OpenWrt:/# luajit -v
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/

It might not be available as a pre-compiled package for your platform, but that just means you should compile it directly :smiley: (if you aren't)..

So you must have debugged what when wrong. Can you file a bug report with a patch to fix the package. I actually don't have any need for LuaJit but it's dumb to have a package there and it doesn't compile because it can't find a header file

I was the last person to touch that package (https://github.com/openwrt/packages/commits/master/lang/luajit), but it was just to add mips64 support. There doesn't seem be an error with the package itself.

Looking at the Fail-log (https://downloads.openwrt.org/snapshots/faillogs/arm_cortex-a15_neon-vfpv4/packages/luajit/compile.txt), it seems that the error has to do with 32-bit libc dev headers missing on the build-bot? Just a guess from the cursory Google search for the error.. they all point to missing kernel headers - and all 32-bit. At a guess, the build-bot is a 64-bit system and the package isn't passing the -m32 properly for the TARGET.

1 Like

It's just missing gcc-multilib.

1 Like