Skip to content

V2 out now

The reports of my death are greatly exaggerated.

published

It’s been a while! After our paid competitor dropped a version 2, we decided to get to work on ours and completely rewrite everything from scratch. After 147 days, we are ready to show it off to everyone. So what has changed?

Performance

With Version 2, we focused on speed. A main complaint of Version 1 was the speed, so this was something we worked heavily on. Another factor with why speed needs to be considered is because of our ratelimits. I mean, no competitor I’ve seen has the limits we do, so they don’t really face the issues we have, but we’re getting a bit offtopic. On average, Version 2 is about 1.2-2x faster than Version 1. Love that.

Options

A highly requested feature was options, so they’re added! Here are the defaults:

{
  "renamingType": "UNIQUE_VALUE_BASED",
  "useDebugLocals": true,
  "ifExpressions": true,
  "virtualizeContinue": true,
  "resugarInterpolatedStrings": true,
  "compoundAssignments": true,
  "genericForSugaring": true,
  "enableRegisterCoalescing": true,
  "registerCoalescingThreshold": 190,
  "doBlockInsertionThreshold": 170,
  "emitBlankLines": true,
  "emitUtf8": true,
  "integralFloatsAsInts": true,
  "scientificNotation": false,
  "tableFunctionSugaring": true,
  "numericForStepSugaring": true,
  "upvalueComments": true,
  "lineInfoMode": "FUNCTION_LEVEL",
  "emitTypeAnnotations": false
}

renamingType and lineInfoMode can be set to NONE, registerCoalescingThreshold and doBlockInsertionThreshold just take integers.

To set settings, please use our API that accepts options https://api.lua.expert/v1/decompile, not https://api.lua.expert/decompile in this way:

{
  "script": "base64 bytecode here",
  "decompilerOptions": {
      // options you want to change here, for example "lineInfoMode": "NONE", 
  }
}

Do these options look familiar? Can’t put my finger on it 🙂

More than just Luau

lua.expert started as a Luau decompiler, and after perfecting Luau we planned to expand to other variants of Lua, and Lua itself. During Version 2’s development, we decided to beta-test Lua 5.x support in Version 1 via a specialized build we made. This beta never made it out of beta because only about three people made tickets for Lua bytecode to be decompiled, and also because it was very rushed.

With Version 2, we’ve added actual good support for Lua 2.x-5.x, alongside any Lua variation we could find like LuaJIT, LuaJ, MoonSharp.

Output

By a truly unbelievable coincidence, in July I had gone out for a walk when I saw a small hard drive fall off a truck ahead of me. As I got closer, the aluminium shell had one word written on it: “Scoob”.

That paragraph was a joke for people who couldn’t tell. Anyways, output has been greatly improved over Version 1. It’s something that we didn’t like when we were compared to paid, and free competitors. Now, I like our output. We encourage everyone to try and see how they like it

Conclusion

New version. Better output. Options. Lua 2.x-5.x, LuaJIT, LuaJ, and MoonSharp support. Internal codename Google. That’s all we have for you today.