r/GodotEngine • u/MilkyJoe8k • 2h ago
GDNC: GDScript Native Compiler (GDExtension)
https://github.com/anomaleigh/gdncI'm making my GDScript native compiler - gdnc - available to the Godot community (open source, MIT). I originally built it for my own game projects, primarily because I didn't want my GDScript code included with my full game release. My design goals were:
- Available as a drop-in plugin/extension (no need for custom engine builds)
- 1:1 output conformity (interpreter:compiler)
- Full platform support (* excluding web initially)
- Optimised as much as possible wherever possible (as long as the 1:1 requirement is respected)
- Must be easy to maintain and upgrade to each new stable Godot release
- Debug and profiling must work in exported builds (optionally)
- Compilation happens on export - no change to the existing development workflow
- Every GDScript feature must be included
It includes extensive testing, conformity checking and benchmarking in the core build process. Every single code change is checked against the interpreted builds. It's currently built against Godot 4.8-rc2 and, whilst I'm still working on further optimisations, it's already proving to be rock solid. I'm seeing significant gains in my own projects (the "monsters" and "battle-board" test projects mentioned in the documentation). It's still possible to compile native builds for (say) Windows releases on MacOS, as it is with Godot now.
I'm a developer with some 33 years of commercial experience but, whilst I architected gdnc, I used Claude to build the bulk of the code. This has NOT been vibe coded - I used the same agentic processes that I use in my day job (a C# developer). Hopefully the quality of the project speaks for itself but I appreciate some people will disregard it because of the use of AI. I just want to be fully transparent.
I will be adding it to the Godot asset store with the release of Godot 4.8, to make it as accessible as possible, and I hope others find it useful. And any feedback is welcome.
1
u/HeadClot 2h ago
Looking forward to the asset store release. Good work!