Vetro is a declarative GTK4 UI transpiler with a built-in Language Server Protocol (LSP) server.
You can:
- transpile
.vetroto GTK.ui - transpile
.uiback to.vetro
- Go 1.24+
- Gtk-4.0.gir (optional)
go build -o vetro .Transpile Vetro to UI:
./vetro --in example.vetro --out example.uiTranspile UI to Vetro:
./vetro --in example.ui --out example.vetroWatch mode:
./vetro --in example.vetro --out example.ui --watchFor a local SIT build, select its GIR directories explicitly:
./vetro --gir-path /path/to/sit-build/gtk --in example.vetro --out example.uiThe same option works with --lsp. VETRO_GIR_PATH provides the default when
--gir-path is omitted. The first directory has priority over later directories
and system metadata. --gir has priority over all directories. Missing, empty
or malformed explicit metadata fails rather than silently using another toolkit.
SIT retains the GTK namespaces and GtkBuilder format, so existing Vetro sources
keep their widget names.
GTK's build tree puts Gtk-4.0.gir, Gdk-4.0.gir and Gsk-4.0.gir together
in gtk/. For an installed toolkit, use its share/gir-1.0 directory. Separate
directories with : on Linux or ; on Windows.
./vetro --lspMIT — see LICENSE.
Maintainers may use generative AI tools as assistants while working on vetro. Non-trivial assisted commits disclose the tool, model, and scope of the work.
AI tools may assist with code comments, documentation, repetitive code, and issue triage. Maintainers make project decisions and review every assisted change before it is merged.
Use these trailers for non-trivial assisted commits:
Assisted-by: <tool>:<model-version>
AI-Scope: <what the tool generated and the prompt or a short prompt summary>
Single-line completions, renames, and formatting changes do not need trailers.
Coding agents must also follow AGENTS.md before changing files, creating commits, or opening pull requests.