Skip to content

Compiling Without GUI

When to Use --no-gui

Use --no-gui when: - GTK4 is not installed - Creating console applications only - Want smaller executable size - Distributing to systems without GTK4

How to Compile

./choco compile myapp.choco --no-gui

Limitations

GUI functions will not be available: - All gui_* functions will throw errors at runtime - Console/terminal features work normally - All other language features work

Example

// console-app.choco
print "This is a console app";
let name = input("Enter name: ");
print "Hello, #{name}!";

// This would error at runtime if called:
// gui_init();  // Error: GUI not available

Compile:

./choco compile console-app.choco --no-gui