rce-incorporated / Fiu

Luau bytecode interpreter for Luau
MIT License
91 stars 18 forks source link

[REQ] Add opcode encoding options such as Client & Studio encodings. #33

Closed dumpstring closed 4 months ago

dumpstring commented 7 months ago

I've been experimenting with pulling bytecode out of Roblox Studio & using unluau to decompile the bytecode i get, and this gave me the idea to try to run this bytecode in Fiu, however since the opcodes are encoded in a different way (the main reason unluau has an opcode encoding option) i cant really run the bytecode in Fiu. I would submit a pull request, however i have no idea how this encoding stuff works (also i have no idea how bytecode works).

Would appreciate if you add this, thanks!

TheGreatSageEqualToHeaven commented 7 months ago

Opcode encoding is a good idea, it is an easy feature to add and we'll see to adding it once we have time.

dumpstring commented 7 months ago

Opcode encoding is a good idea, it is an easy feature to add and we'll see to adding it once we have time.

sorry for being impatient, but if you dont mind me asking, when will you have time?

sturmgeisty commented 6 months ago

please have this added 🙏 it will be so much better

TheGreatSageEqualToHeaven commented 4 months ago

I'm not sure how the client encodes bytecode but you can now do it via decodeOp, you just need to figure out the setting yourself. After looking it might be this.

luau_settings.decodeOp = function(op)
    return op * 227 % 256
end