Tangently related but I’ve been deep in Lua recently working on a rust implementation that supports Lua 5.1-5.5 in one Rust Binary https://github.com/ianm199/omnilua.

My ultimate goal was to support LuaJIT in Rust as well but this does not make it easier.

Also, one issue I have with this repo is that, since so much of it seems to use Claude, as an actual human I struggle to read and parse any of the information.

For example, what’s the performance like?

Performance dashboard is linked here https://ianm199.github.io/omnilua/performance.html.

In a mix of official and unofficial benchmarks wall clock performance is ~1.4x as fast as C Lua and the memory usage is ~1.7x.

So performance is worse to be clear but within range. There’s some performance improvements I haven’t gone for yet that would get it down to ~1.1 I think.

Oh wow, seriously, I always thought Lua should have been like this. The 5.1/5.2/5.3+ split was so painful.

> My ultimate goal was to support LuaJIT in Rust as well but this does not make it easier.

I think you could stop right before the syntax extension.

Heh I was going to queue up a skill that uses the CLI to make it easy to convert scripts to older or newer versions.

If you have any Lua use cases let me know I’m looking for more real world use use cases to justify the effort here.

This is amazing! Can a program call across versions? Like could we take a Lua 5.1 codebase and upgrade only a portion of it at a time to a new Lua version?

Hmm I think in general I would not recommend doing this just because Lua does change pretty significant things from 5.1-5.5 so you could have some really hard to understand behavior if some portions are 5.1 vs 5.4 for example.

I think where it would be most helpful is converting a codebase and being able to easily run tests to ensure behavior is the same.

I created a github gist https://gist.github.com/ianm199/5ba0366376eca673142e1f0c79b4... that explains what is practical (I used AI for this to be clear feel free to skim).

Do you have a use case in mind? Would love to chat or take a look at an github issue if you create one.

[dead]