- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| GPLv3 | ||
| LICENSE | ||
| README.md | ||
Nut Decompiler
Nut decompiler is a squirrel version 2 bytecode decompiler. To produce better insight of the bytecode the code is executed to provide hint. It's default implementation is for 32-bit version of bytecode. 64-bit bytecode should be supported by changing some type definition but wasn't tested. Squirrel 3 is not supported
Usage
Decompile
To decompile a compiled bytecode file test.nut you can type the following command :
zig-out/bin/nutdecompiler decompile --nut_file test.nut --asm_file test.asm --json_file test.json
asm file is an assembly-like file but can't be converted back to nut format for now. json is a json file describing the nut_file, it support recompiling.
Recompile
It is possible to modify the bytecode decompiled in json and recompile in nut format. To recompile the command is :
zig-out/bin/nutdecompiler recompile --nut_file test.nut --json_file test.json
json format is not stabilized so json format may change between commit. Recompile with the same version as you decompiled to json.
Licensing
The whole program is under the GNU Public License version 3 or later. The interpreter module is under MIT license.