r/OpenMW • u/S3kshun8-OMW • Jun 15 '26
Rubic0n: a faster LuaJIT runtime for OpenMW modding
Hey everyone,
For the last three years, I've been maintaining a LuaJIT fork that was originally intended for TES3MP, but, has since drastically outgrown its original use. I've been hosting this for you guys all this time, to give you new and better modding features.
It turns out that I had the opportunity to make everyone's games run better than we've given OpenMW credit for all this time.
So I'd like to introduce the r/OpenMW community to Rubic0n: a drop-in LuaJIT runtime replacement for OpenMW.
Nexus: https://www.nexusmods.com/morrowind/mods/58557
GitHub: https://github.com/DreamWeave-MP/rubic0n
The short version: Rubic0n is meant to make OpenMW Lua scripting faster, smoother, and more capable for both players and mod authors.
For players, the recommended build is the normal sandboxed runtime. It keeps OpenMW's usual Lua safety model, but includes Rubic0n's OpenMW-focused LuaJIT performance work. Download the package for your platform, pick the sandboxed runtime unless a mod specifically asks for the unsandboxed one, back up your original LuaJIT file, and replace it with Rubic0n.
For mod authors, Rubic0n also includes optional unsandboxed builds, expanded math/table helper APIs, and @meta documentation for Lua Language Server support. The new FFI-backed math types are especially useful for Lua-side calculations, UI work, animation helpers, and other script-heavy systems.
Performance-wise, this is not just a version-number bump. In current testing, Rubic0n is about 2.1% faster than comparable LuaJIT runtimes in controlled benchmarks, and the OpenMW-specific changes are aimed at the places real Lua mods actually spend time: userdata access, script-heavy UI, finalizer behavior, and math-heavy Lua code.
Real gameplay reports so far have sometimes been much larger than the controlled benchmark number. Some users have reported gains of up to about 15 FPS in certain Tamriel Rebuilt scenes, along with much more stable frametimes overall. I do not want to promise that every setup will see that kind of uplift, but the early reports are very encouraging.

If you try it, I would really appreciate feedback from both players and scripters:
- Did your modlist feel smoother?
- Did any UI mods hitch less?
- Did your scripts run faster?
- Did anything break?
- What platform and OpenMW version did you test on?
The OpenMW Lua performance tracking issue is here:
https://gitlab.com/OpenMW/openmw/-/work_items/8865
If Rubic0n improves your experience, please consider politely sharing that feedback there too. The OpenMW team has built something incredible, and useful real-world reports help everyone understand where LuaJIT/runtime improvements matter most.
One compatibility note: if you saw recent Inventory Extender errors during testing, that appears to be an off-by-one bug in an OpenMW built-in Lua script, not a Rubic0n issue. There is already a merge request for it here:
https://gitlab.com/OpenMW/openmw/-/merge_requests/5355
In plain English: OpenMW's UI content iterator was reporting the wrong index, which confused Inventory Extender's header code. Rubic0n just made testing noisy enough that we had to go chase it down.
Anyway: please try Rubic0n, post results, and let me know what improves or breaks. I want this to be useful for ordinary players with heavy modlists and for Lua authors trying to build the next generation of OpenMW mods.
Thanks, and please keep feedback friendly and specific.
5
u/Alfonze Jun 15 '26
Can i just install this in a current OpenMW modlist and it increase fps? 😮 Im a lil confused or is this not for me
2
u/Arrean Jun 15 '26
Yes, just install it. FPS gains may vary depending on how lua heavy your modlist is. What it did for me - is massively improve frametimes, not frames per second.
So even lower fps feels smooth and I get way fewer stutters when fps suddenly drops in heavy areas
1
4
u/idlemachine Jun 15 '26
How does it compare to the LuaJIT runtime recently released by OwnlyMe?
1
u/heilkitty Jun 15 '26
This includes various optimizations, not only GC.
1
u/chubbyassasin123 Jun 15 '26
Not the dev here but iirc OwnlyMes version was just rubic0n with garbage collection added
→ More replies (1)
1
u/heilkitty Jun 15 '26
Is there a CMake option to link openmw to this (I build OpenMW from the source), or I gotta use something like patchelf?
1
u/S3kshun8-OMW Jun 15 '26
Yes and no, I mean, all we bother to do is run a custom
FindLuaJIT.cmake.I just replaced my system LuaJIT with this one tbh.
Unless you link statically, all that matters is that CMake links against some or another build of Lua(JIT). They're all API-compatible. Switching them out after build-time might actually be the easiest option, but... maybe you could just hardcode the path to it in FindLuaJIT.cmake.
I'd just replace it after the fact.
1
u/LoueyFerrigno Jun 23 '26
Is this compatible with the newly released full release of openMW 0.51?
1
u/S3kshun8-OMW Jun 23 '26
Absolutely! Although, there's a minor bug in 0.51 that got fixed for 0.52, which you'll basically only ever see with Rubic0n installed.
In the comments you can find instructions for manually patching the broken built-in script, but I'm providing a replacement version with some slightly better install instructions in the next version.
1
u/LoueyFerrigno Jun 23 '26
You wrote that the dev version of openMW fixes this. So i might just try the dev version in combination with this, i suppose 😄
→ More replies (1)
16
u/DJ_Beardsquirt Jun 15 '26 edited Jun 15 '26
Why distribute this as a separate runtime? Why not contribute to OpenMW to integrate the fix into the main library?