LinuxCommandLibrary

valac

Vala programming language compiler

TLDR

Compile program

$ valac [file.vala]
copy
Output executable
$ valac -o [output] [file.vala]
copy
With GTK
$ valac --pkg [gtk4] [file.vala]
copy
Generate C code only
$ valac -C [file.vala]
copy
Debug build
$ valac -g [file.vala]
copy

SYNOPSIS

valac [-o output] [--pkg name] [-C] [options] files

DESCRIPTION

valac is the official compiler for the Vala programming language. It performs a two-step compilation process, first translating Vala source code into C, then invoking a C compiler to produce native binaries. This design provides native performance while offering a high-level, object-oriented syntax.
The compiler integrates with the GObject type system and uses pkg-config for dependency management via the --pkg flag. It is commonly used for GNOME and GTK application development, and can also generate GObject Introspection data for language bindings and C header files for library interoperability.

PARAMETERS

-o FILE

Output name.
--pkg NAME
Use package.
-C
C code only.
-g
Debug symbols.
--gir FILE
Generate GIR.
--target-glib VER
GLib version.

CAVEATS

C compiler needed. GLib required. GNOME-centric.

HISTORY

valac is the official Vala compiler, generating C code that compiles with any C compiler.

SEE ALSO

vala(1), gcc(1), pkg-config(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community