No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-18 19:07:22 +02:00
src ADDED README AND LICENSING 2026-09-18 19:07:22 +02:00
.gitignore starting_commit 2026-08-22 13:23:36 +02:00
build.zig Added Test + Improvement of clone and eq 2026-09-12 19:32:44 +02:00
build.zig.zon starting_commit 2026-08-22 13:23:36 +02:00
GPLv3 corrected licensing 2026-08-27 13:41:35 +02:00
LICENSE corrected licensing 2026-08-27 13:41:35 +02:00
README.md ADDED README AND LICENSING 2026-09-18 19:07:22 +02:00

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.