Basic command shape:
gdcc [options] <files...>Minimal example:
gdcc -o build/demo src/player.gdTo compile multiple scripts into one module:
gdcc -o build/demo src/player.gd src/enemy.gdWhen compiling scripts that belong to a Godot project, pass the project file to let GDCC emit .gdextension metadata:
gdcc --project game/project.godot -o build/demo game/src/player.gdTo compile a whole Godot project at once, pass project.godot itself as the positional input. GDCC then auto-discovers the project's .gd3 sources (honoring gdcc/sync/excluded_globs, default addons/gdcc/*), compiles them together with any .gd files listed on the command line, and publishes the native library plus bin/gdcc.gdextension into the project's bin/ directory:
gdcc game/project.godot
gdcc game/project.godot game/src/explicit_helper.gdIn project mode, gdcc/build/* entries in project.godot supply the default optimization level, strict mode, and C compiler backend; explicit --opt/--backend options override them. -o only selects the internal build directory (default .godot/gdcc/cli/<project-identity>/) — it does not change the bin/ publish target.
Useful options:
-o/--output <output>: output target path. In file mode, if omitted, GDCC derives a name from the input files; in project mode it only selects the internal build directory (default.godot/gdcc/cli/<project-identity>/).--gde <version>: Godot GDExtension API version. Currently only4.5.1is supported.--opt/--optimize <level>:debugorrelease.--target <platform>: target platform, such aslinux-x86-64,windows-x86-64,linux-aarch64, ormacos-aarch64.--prefix <prefix>and--class-map Source=Canonical: control generated top-level canonical class names.