GUML is a declarative UI markup language (.guml) for Godot .NET, providing a QML/XAML-like development experience. It allows developers to define UI components and layouts using a concise syntax, with support for data binding, event handling, and reusable components. GUML uses Roslyn Source Generator for compile-time code generation, delivering maximum performance with zero runtime overhead.
- QML-like declarative syntax
- Data binding — automatically update UI when controller properties change (one-way
:=, two-way<=>, reverse=:) - Event wiring — connect Godot signals and C# events with one line
- List rendering —
eachblocks with incremental updates viaObservableCollection<T> - Reusable components — compose and reuse
.gumlfiles with typed parameters - Full Godot UI component support (all built-in Control types)
- Theme overrides — set theme styles directly in GUML
- Source Generator mode — compile-time code generation for maximum performance
dotnet add package GUMLFor source generator support:
dotnet add package GUML.SourceGenerator- Documentation Hub — guides, reference, and API docs
- Quick Start — install GUML, write your first
.gumlfile, run it in Godot - GUML Syntax — full syntax reference
The formal GUML language specification is available in the GUMLSpec directory. It covers:
- Lexical structure & grammar (BNF)
- Types, expressions, and directives
- Component model and controller integration
- Code generation and API interface specifications
- Diagnostics
Editor plugins have been moved to their own repositories:
| Editor | Repository |
|---|---|
| VS Code | GUML.VSC |
| JetBrains Rider | GUML.Rider |
| Directory | Description |
|---|---|
GUML |
Core runtime library — GuiController, converters, bindings |
GUML.Shared |
Shared infrastructure — full-fidelity CST parser, API metadata models, diagnostics |
GUML.SourceGenerator |
Roslyn source generator for compile-time .guml → C# code generation |
GUML.Analyzer |
Language analyzer CLI tool — Roslyn-based project analysis and LSP features via JSON-RPC |
GUMLSpec |
Formal language specification |
Doc |
User documentation (guides, reference, quick start) |
TestApplication |
Sample Godot project demonstrating GUML usage |
main.guml:
Panel {
size: vec2(640, 480),
theme_overrides: {
panel: style_box_flat({
bg_color: color(0.4, 0.4, 0.4, 0.4)
})
},
Label {
position: vec2(10, 10),
size: vec2(200, 30),
// $controller.SayHello binding to Label.text.If SayHello changes, text will also change.
text:= "hello " + $controller.SayHello
}
Button {
position: vec2(10, 50),
size: vec2(200, 30),
text: "Change world",
#pressed: $controller.ChangeHelloBtnPressed
}
}
MainController.cs:
public class MainController : GuiController
{
public string SayHello {
get => _sayHello;
set
{
_sayHello = value;
OnPropertyChanged();
}
}
private string _sayHello = "world!";
public void ChangeHelloBtnPressed()
{
SayHello = "new world!";
}
}After clicking the change world button, the text will change to hello new world!
