• Stars
    star
    786
  • Rank 57,890 (Top 2 %)
  • Language Vala
  • License
    GNU Lesser Genera...
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Read-only mirror of https://gitlab.gnome.org/GNOME/vala

What is Vala?

Vala is a programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.

valac, the Vala compiler, is a self-hosting compiler that translates Vala source code into C source and header files. It uses the GObject type system to create classes and interfaces declared in the Vala source code.

The syntax of Vala is similar to C#, modified to better fit the GObject type system. Vala supports modern language features as the following:

  • Interfaces
  • Properties
  • Signals
  • Foreach
  • Lambda expressions
  • Type inference for local variables
  • Generics
  • Non-null types
  • Assisted memory management
  • Exception handling

Vala is designed to allow access to existing C libraries, especially GObject-based libraries, without the need for runtime bindings. All that is needed to use a library with Vala is an API file, containing the class and method declarations in Vala syntax. Vala currently comes with bindings for GLib and GTK+.

Using classes and methods written in Vala from an application written in C is not difficult. The Vala library only has to install the generated header files and C applications may then access the GObject-based API of the Vala library as usual. It should also be easily possible to write a bindings generator for access to Vala libraries from applications written in e.g. C# as the Vala parser is written as a library, so that all compile-time information is available when generating a binding.

More information about Vala is available at https://wiki.gnome.org/Projects/Vala/

Building Vala

Instructions on how to build the latest version of Vala. These can be modified to build a specific release.

Step One:

Install the following packages:

  • a C compiler, e.g. GCC
  • a C library, e.g. glibc
  • glib (>= 2.56)
  • flex
  • bison
  • Graphviz (libgvc) (>= 2.16) to build valadoc
  • make
  • autoconf
  • autoconf-archive
  • automake
  • libtool

These additional packages are needed to generate the documentation:

  • help2man when updating the man pages
  • xsltproc
  • weasyprint for PDF generation

Step Two:

Decide where the Vala compiler is to be found.

Vala is self-hosting so it needs another Vala compiler to compile itself. valac is the name of the executable and can be:

If you have an existing valac installed then move on to step three.

If you don't have an existing version of Vala installed (i.e. because you're bootstrapping or cross-compiling) then a source tarball or the vala-bootstrap module contain pre-compiled C files from the Vala sources. These can be used to bootstrap valac.

Current releases of source tarballs can be downloaded via:

https://wiki.gnome.org/Projects/Vala

or the vala-bootstrap module is available at:

https://gitlab.gnome.org/Archive/vala-bootstrap

Here is an example on how to download and compile from a Vala release tarball. In this example it is release version 0.48.19:

curl --silent --show-error --location https://download.gnome.org/sources/vala/0.48/vala-0.48.19.tar.xz --output vala-bootstrap.tar.xz
tar --extract --file vala-bootstrap.tar.xz
cd vala-bootstrap
./configure --prefix=/opt/vala-bootstrap
make && sudo make install

The configure script will check if valac can be found in PATH. If not then valac is bootstrapped from the C source files in the tarball. If you do not wish to install the bootstrapped version of valac it can be found in vala-bootstrap/compiler/valac This is a libtool wrapper script that makes the libraries in the build directory work together.

An example of downloading and compiling from the bootstrap module:

git clone https://gitlab.gnome.org/Archive/vala-bootstrap
cd vala-bootstrap
touch */*.stamp
VALAC=/no-valac ./configure --prefix=/opt/vala-bootstrap
make && sudo make install

Step Three:

Compiling the newest Vala from the repository using a pre-installed valac:

git clone https://gitlab.gnome.org/GNOME/vala
cd vala
./autogen.sh
make && sudo make install

To use valac from a bootstrapped build detailed in step two use:

git clone https://gitlab.gnome.org/GNOME/vala
cd vala
VALAC=/opt/vala-bootstrap/bin/valac ./autogen.sh
make && sudo make install

Compiling Different Vala Versions

Maybe you now want to compile Vala with the new version you have just installed. Then you simply clean the version files and start the build. Be warned that git clean -dfx will remove all untracked files from the source tree:

git clean -dfx
./autogen.sh
make && sudo make install

If you wish to build a specific release, for example 0.54.1:

git checkout 0.54.1
git clean -dfx
./autogen.sh
make && sudo make install

More Repositories

1

gimp

Read-only mirror of https://gitlab.gnome.org/GNOME/gimp
C
4,562
star
2

glib

Read-only mirror of https://gitlab.gnome.org/GNOME/glib
C
1,375
star
3

gtk

Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
C
1,275
star
4

meld

Read-only mirror of https://gitlab.gnome.org/GNOME/meld
Python
949
star
5

gnome-shell

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell
C
715
star
6

libxml2

Read-only mirror of https://gitlab.gnome.org/GNOME/libxml2
C
479
star
7

gedit

Read-only mirror of https://gitlab.gnome.org/GNOME/gedit
C
399
star
8

geary

Read-only mirror of https://gitlab.gnome.org/GNOME/geary
Vala
353
star
9

dia

Read-only mirror of https://gitlab.gnome.org/GNOME/dia
C
324
star
10

librsvg

Read-only mirror of https://gitlab.gnome.org/GNOME/librsvg
Rust
313
star
11

nautilus

Read-only mirror of https://gitlab.gnome.org/GNOME/nautilus
C
307
star
12

evince

Read-only mirror of https://gitlab.gnome.org/GNOME/evince
C
301
star
13

gnome-terminal

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-terminal
C++
266
star
14

epiphany

Read-only mirror of https://gitlab.gnome.org/GNOME/epiphany
C
264
star
15

gparted

Read-only mirror of https://gitlab.gnome.org/GNOME/gparted
C++
254
star
16

gnome-builder

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-builder
C
232
star
17

glade

Read-only mirror of https://gitlab.gnome.org/GNOME/glade
C
206
star
18

rhythmbox

Read-only mirror of https://gitlab.gnome.org/GNOME/rhythmbox
C
192
star
19

mutter

Read-only mirror of https://gitlab.gnome.org/GNOME/mutter
C
170
star
20

gitg

Read-only mirror of https://gitlab.gnome.org/GNOME/gitg
Vala
167
star
21

vte

Read-only mirror of https://gitlab.gnome.org/GNOME/vte
C++
161
star
22

gjs

Read-only mirror of https://gitlab.gnome.org/GNOME/gjs
C++
155
star
23

zenity

Read-only mirror of https://gitlab.gnome.org/GNOME/zenity
C
150
star
24

gtkmm

Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm
Scheme
147
star
25

shotwell

Read-only mirror of https://gitlab.gnome.org/GNOME/shotwell
Vala
145
star
26

pygobject

Read-only mirror of https://gitlab.gnome.org/GNOME/pygobject
Python
144
star
27

gthumb

Read-only mirror of https://gitlab.gnome.org/GNOME/gthumb
C
140
star
28

evolution

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution
C
139
star
29

pango

Read-only mirror of https://gitlab.gnome.org/GNOME/pango
C
132
star
30

sushi

Read-only mirror of https://gitlab.gnome.org/GNOME/sushi
C
123
star
31

pitivi

Read-only mirror of https://gitlab.gnome.org/GNOME/pitivi
Python
120
star
32

gnome-music

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-music
Python
119
star
33

adwaita-icon-theme

Read-only mirror of https://gitlab.gnome.org/GNOME/adwaita-icon-theme
Python
113
star
34

gnome-boxes

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-boxes
Vala
112
star
35

baobab

Read-only mirror of https://gitlab.gnome.org/GNOME/baobab
Vala
104
star
36

orca

Read-only mirror of https://gitlab.gnome.org/GNOME/orca
Python
96
star
37

gnome-calendar

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-calendar
C
92
star
38

gdm

Read-only mirror of https://gitlab.gnome.org/GNOME/gdm
C
87
star
39

gnome-desktop

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-desktop
C
86
star
40

ocrfeeder

Read-only mirror of https://gitlab.gnome.org/GNOME/ocrfeeder
Python
84
star
41

gnome-control-center

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-control-center
C
80
star
42

gnome-screenshot

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-screenshot
C
78
star
43

gnumeric

Read-only mirror of https://gitlab.gnome.org/GNOME/gnumeric
C
77
star
44

gvfs

Read-only mirror of https://gitlab.gnome.org/GNOME/gvfs
C
76
star
45

gnome-system-monitor

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-system-monitor
C++
74
star
46

gegl

Read-only mirror of https://gitlab.gnome.org/GNOME/gegl
C
73
star
47

gnome-software

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-software
C
72
star
48

gnome-tweaks

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-tweaks
Python
71
star
49

d-feet

Read-only mirror of https://gitlab.gnome.org/GNOME/d-feet
Python
71
star
50

easytag

Read-only mirror of https://gitlab.gnome.org/GNOME/easytag
C
69
star
51

gnome-multi-writer

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-multi-writer
C
69
star
52

ghex

Read-only mirror of https://gitlab.gnome.org/GNOME/ghex
C
66
star
53

glibmm

Read-only mirror of https://gitlab.gnome.org/GNOME/glibmm
Scheme
62
star
54

gobject-introspection

Read-only mirror of https://gitlab.gnome.org/GNOME/gobject-introspection
C
61
star
55

gstreamermm

Read-only mirror of https://gitlab.gnome.org/GNOME/gstreamermm
Scheme
61
star
56

libadwaita

Read-only mirror of https://gitlab.gnome.org/GNOME/libadwaita
C
61
star
57

gnome-calculator

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-calculator
Vala
61
star
58

gnome-maps

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-maps
JavaScript
60
star
59

tracker

Read-only mirror of https://gitlab.gnome.org/GNOME/tracker
C
59
star
60

polari

Read-only mirror of https://gitlab.gnome.org/GNOME/polari
JavaScript
58
star
61

cheese

Read-only mirror of https://gitlab.gnome.org/GNOME/cheese
C
58
star
62

rygel

Read-only mirror of https://gitlab.gnome.org/GNOME/rygel
Vala
58
star
63

libsoup

Read-only mirror of https://gitlab.gnome.org/GNOME/libsoup
C
57
star
64

gnome-backgrounds

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-backgrounds
Meson
56
star
65

evolution-ews

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution-ews
C
56
star
66

brasero

Read-only mirror of https://gitlab.gnome.org/GNOME/brasero
C
55
star
67

gnome-disk-utility

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-disk-utility
C
54
star
68

gtksourceview

Read-only mirror of https://gitlab.gnome.org/GNOME/gtksourceview
C
54
star
69

dasher

Read-only mirror of https://gitlab.gnome.org/GNOME/dasher
C
54
star
70

gnote

Read-only mirror of https://gitlab.gnome.org/GNOME/gnote
C++
53
star
71

libxslt

Read-only mirror of https://gitlab.gnome.org/GNOME/libxslt
HTML
53
star
72

totem

Read-only mirror of https://gitlab.gnome.org/GNOME/totem
C
52
star
73

libnotify

Read-only mirror of https://gitlab.gnome.org/GNOME/libnotify
C
51
star
74

gnome-shell-extensions

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell-extensions
JavaScript
50
star
75

simple-scan

Read-only mirror of https://gitlab.gnome.org/GNOME/simple-scan
Vala
48
star
76

file-roller

Read-only mirror of https://gitlab.gnome.org/GNOME/file-roller
C
48
star
77

libsecret

Read-only mirror of https://gitlab.gnome.org/GNOME/libsecret
C
46
star
78

cantarell-fonts

Read-only mirror of https://gitlab.gnome.org/GNOME/cantarell-fonts
Python
45
star
79

jhbuild

Read-only mirror of https://gitlab.gnome.org/GNOME/jhbuild
Python
44
star
80

gnome-settings-daemon

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-settings-daemon
C
44
star
81

recipes

Read-only mirror of https://gitlab.gnome.org/GNOME/recipes
C
43
star
82

eog

Read-only mirror of https://gitlab.gnome.org/GNOME/eog
C
41
star
83

seahorse

Read-only mirror of https://gitlab.gnome.org/GNOME/seahorse
C
39
star
84

fractal

Read-only mirror of https://gitlab.gnome.org/GNOME/fractal
Rust
38
star
85

evolution-activesync

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution-activesync
C
38
star
86

gnome-chess

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-chess
Vala
37
star
87

gnome-commander

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-commander
C++
36
star
88

libgda

Read-only mirror of https://gitlab.gnome.org/GNOME/libgda
C
35
star
89

alacarte

Read-only mirror of https://gitlab.gnome.org/GNOME/alacarte
Python
34
star
90

nautilus-python

Read-only mirror of https://gitlab.gnome.org/GNOME/nautilus-python
C
33
star
91

msitools

Read-only mirror of https://gitlab.gnome.org/GNOME/msitools
C
33
star
92

gtkmm-documentation

Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm-documentation
Python
32
star
93

dconf-editor

Read-only mirror of https://gitlab.gnome.org/GNOME/dconf-editor
Vala
31
star
94

libgsf

Read-only mirror of https://gitlab.gnome.org/GNOME/libgsf
C
31
star
95

devhelp

Read-only mirror of https://gitlab.gnome.org/GNOME/devhelp
C
30
star
96

gedit-plugins

Read-only mirror of https://gitlab.gnome.org/GNOME/gedit-plugins
Python
27
star
97

metacity

Read-only mirror of https://gitlab.gnome.org/GNOME/metacity
C
27
star
98

sysprof

Read-only mirror of https://gitlab.gnome.org/GNOME/sysprof
C
26
star
99

gdk-pixbuf

Read-only mirror of https://gitlab.gnome.org/GNOME/gdk-pixbuf
C
25
star
100

gnome-online-accounts

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-online-accounts
C
25
star