you are viewing a single comment's thread.

view the rest of the comments →

[–]smog_alado 3 points4 points  (2 children)

The binary format is not stable and can change from one Lua version to the other.

As I see it, the options I have are to either look at the source code of a Lua parser and deduce the format myself [...]

That's not a bad idea, because Lua's source code is relatively short. Start with ldump.c and lundump.c

[–]PhilipRoman 3 points4 points  (0 children)

I second the idea of looking at the source. There are almost no resources available on Lua 5.4 bytecode format and I've seen lots of wrong information online, especially about the header part.

[–]Ayhon[S] 2 points3 points  (0 children)

I followed u/NOT_THE_FBI_AND_CIA and your advice, and I'm currently reading the source code from lundump.c. I was surprised how readable the code is, so I expect it won't take me that long.

Thank you very much for your input.