This project includes native exports for unluac built with GraalVM Native Image. They expose a small C-callable interface that processes byte buffers in either decompile or disassemble mode. The API supports optional flags (raw strings, LuaJ, no debug mode), optional opcode-map input (text or binary patch), and returns both output data and error logs.
This repository is an unofficial fork of the original unluac project on SourceForge.
unluac is a decompiler for Lua 5.0 through 5.4. It runs on Lua chunks that have been compiled with the standard Lua compiler. It requires that debugging information has not been stripped from the chunk. (By default, the Lua compiler includes this debugging information.) The current version also has pretty good support for Lua 5.0 and Lua 5.1. Support for later versions is also good if the code doesn't use too many gotos.
Quick start: download unluac.jar from SourceForge and run java -jar unluac.jar myfile.lua > myfile_decompiled.lua.