Vala - Documentation

Getting Started

Here is a staged approach to get familiar with the Vala compiler, related tools and the Vala language:

The first thing to do is install Vala for your platform and compile a small program to show everything is working.

The second activity is to skim over the Sample Code on this page and choose a topic that interests you. Compile one or more sample programs from that topic area and pay special attention to the use of the --pkg option with valac. This tells the Vala compiler which library binding the program should use. Cross-reference the name of the package with its API documentation at Valadoc.org. Valadoc.org is a great resource for finding bindings to libraries and becoming familiar with a library's API (Application Programming Interface).

The third activity is to get familiar with third party build tools and code editors. If you are unfamiliar with such development tools then a good set of starting options are an up to date version of GNOME Builder for editing Vala code. Then a build tool like Meson or CMake. GNOME Builder can create Meson build files and Autovala can create both Meson and CMake build files. These tools are useful for larger projects.

The fourth activity is to get inspired! Visit some of the Projects Developed in Vala linked to from this page. As a taster visit Akira and BirdFont. These are all GUI (Graphical User Interface) applications using the GTK 3 toolkit. Corebird and Gradio also use special attributes in Vala code to trigger Vala's code generation routines that make using GtkBuilder user interface files a lot easier. In those two projects' source code repositories look for files ending in .ui and the use of [GtkTemplate], [GtkChild] and [GtkCallback] attributes in Vala code.

The fifth activity is to become familiar with the resources available about the Vala language. The Vala syntax is heavily influenced by C#, but it is better to start looking at the Vala Tutorials available. If concepts like strong typing and objects aren't familiar to you then documentation for C# may help explain the underlying idea, but focus on the concept rather than the C# syntax. The syntax in Vala may be different. The Tutorials linked to on this page cover Vala itself and explanations for those coming from a C# or Java background. Vala also has a Reference Manual available online, for download as a PDF and as a Devhelp package available through distributions.

Vala is a community driven project so the sixth activity is to share your experiences. This helps consolidate your understanding and offer insight to others. Blogs posts and shared code repositories are common ways of doing this.

Tutorials

If you want some tips before start hacking in Vala, take a tutorial and see what you can do with this.

If you find any mistakes in the tutorials on wiki.gnome.org please feel free to correct them.

The Vala Reference Manual

Vala Reference Manual

The Vala Reference Manual is also available for your installed version of Vala as DevHelp from your distribution. For Red Hat based distributions, like Fedora, the package is vala-doc. For Debian based distributions, like Ubuntu and elementary OS, the Vala API version is also used in the package name. For example vala-0.40-doc is the documentation package for the Vala 0.40 API.

Contributions to the Vala reference manual are always welcome. To add content, fix some typos or more, go to the GitLab repository. The reference manual source code is in doc/manual.

Genie

Genie is another programming language supported by the Vala compiler with a syntax closer to Python.

Bindings

Vala has bindings to over 250 libraries. A good starting place is to read valadoc.org. This site holds bindings' API documentation generated by Vala's valadoc tool. The site is currently hosted by elementary OS. A desktop focused operating system with apps written in Vala.

Other Resources

Places to discuss and ask questions

Recommended:

  • GNOME Discourse - ask questions and discuss about using vala - with the Vala tag

  • Matrix Vala room Official place for talking about developing Vala and how to contribute, but also other questions or bugs - PS You can find Ricotz there

  • Discord Vala Channel - hang out with the community

Other:

Sample Code

If you have trouble compiling an example try the latest release of Vala. Some distributions ship with older versions of Vala which may lack some features. Also make sure that the respective libraries are installed along with their header files (e.g. *-devel packages on RedHat/Fedora/SuSE, *-dev packages on Debian/Ubuntu).

Language Features and Introductory Samples

Basics: Collections, Files, I/O, Networking, IPC

Functional programming

Gpseq Library

  1. Work-stealing and managed blocking task scheduling: Similar behavior to Go scheduler

  2. Functional programming for data processing with parallel execution support: An equivalent to Java's streams (map, flat map, order by, filter, fold ...)

  3. Futures and promises

  4. Task scheduling - WIP

  5. Parallel sorting

  6. Fork-join parallelism

Other features

Compose Library

Compose is a Functional templating for Vala.

Features
  • lazy evaluation using callbacks with native environments
  • it's reusable since nodes can be isolated in functions
  • it provides minimal compile-time correctness
  • HTML5 elements support

GUI Programming

Multimedia and Graphics

GNOME Platform

GLib Samples

Database Access

Other

Projects Developed in Vala

Vala Specific

  • Autovala - A project manager for Vala that automatically creates and maintains CMake scripts.

  • DHGBinaryUtils - is a set of static routines (for convenience packed into classes) written in Vala that are aimed at facilitating storage and retrieval of data chunks from uint type variables.

  • Gee - Collection Library

  • Gpseq - A parallelism library for Vala and GObject

  • gtkaml - An Application Markup Language for GTK/Vala.

  • Vala Benchmarks - Compare Vala versus others languages à la http://shootout.alioth.debian.org/.

  • Valadate - Unit Testing Framework

  • vala-dbus-binding-tool - Create Vala D-Bus Interfaces from XML Specifications

  • Valadoc - Documentation generator for generating API documentation from Vala source code.

  • Valag - Vala Graphviz code tree and control flow graph generator

  • ValaBind - Valabind is a tool to parse vala or vapi files to transform them into swig interface files, C++, NodeJS-ffi or GIR.

  • Aroop - Aroop is vala language profile for object-pool-plus library. I hope it is faster than gobject profile for vala.

  • VLS - Basic Language Server for Vala

  • Vala Language Server - Visual Studio Code extension for a Vala Language Server

  • vala-grammar - Vala Syntax Highlighting for Visual Studio Code

  • vala-code - Vala language support for Visual Studio Code

  • Vala Language Server - Code Intelligence for Vala

  • ValaVerbalExpressions - Regular expressions in Vala made easy

  • Jaa - High-level wrapper over JSON

  • json-api-glib - The provided classes consist of serializable GLib.Object definitions producing conformant JSON API payloads.

  • EasyJSON - This class adds syntactic sugar to JSON-Glib. It's mainly meant for making it easy to generate JSON documents for sending to single-page web applications.

  • vapis - More Vapis

  • Option Guess - A helper for command line options

  • vala-object - Use Vala from Ruby, Python, Lua, JavaScript (Node.js, gjs, seed) and many other languages

  • Vanat - Dependency Manager for Vala App under development!

  • liblog - Super simple logging functionality just here to try something out.

  • Console commands - Library to route command-line arguments to a Command pattern object, current implementation covers extension by inheritance or using closures.

  • Valabind - create bindings from vapi to nodejs, python, swig, c++

  • Valadate - Testing framework for GObject (Arrange >> Act >> Assert with Valadate)

  • valacef - WIP Vala bindings for Chromium Embedded Framework (CEF).

  • VSGI - VSGI is a middleware that interfaces different Web server technologies under a common and simple set of abstractions

  • Log4Vala - is a logging framework for Vala (or other GLib/GObject projects), heavily inspired by the syntax and architecture of Log4J and similar projects

  • Almanna - The Almanna ORM for Vala/GLib

  • Ambition - The Ambition MVC Framework for Vala

  • vast - vala and scientific numerical computation

  • vprocessing - this is a re implimentation of the basic functionality that is found in processing (see processing) but in vala and SDL.

  • semver - SemVer is a little library that helps you manipulating semantic versions.

  • GVS - GObject to GVariant serialization library

  • GOM - GObject Data Mapper (GObject -> SQLite)

By Daniel Espinosa

  • VDA - Is a set of interfaces to access Data Bases written in Vala. There are a set of classes implementing VDA interfaces using GDA as backend. Allowing to use its features. A native backend is an implementation of VDA interfaces using the C and/or a Vala bindings of a database engine.

  • GXml - An XML library

  • GVLS - GNOME Vala Language Server (GNOME Builder(already in)|elementary Code|Gedit)

GTK Specific

Applications / Applets / Other Projects

  • Akira - Akira is a native Linux Design application built in Vala and GTK. Akira focuses on offering a modern and fast approach to UI and UX Design, mainly targeting web designers and graphic designers.

  • Aptik - Aptik is a proprietary(EULA) tool for migrating settings and data from an existing Linux system to a newly installed system.

  • Almanna - Object-relation mapping (ORM) for Vala/GLib

  • Ambition Framework - A "next-generation MVC web application framework", written in and targeted at the Vala programming language

  • pace - A simple graphical tool to edit pacman.conf

  • Baobab - Disk usage analyzer

  • Birdfont - A font editor

  • Brickman - Brick Manager for ev3de (OS for LEGO® MINDSTORMS EV3)

  • Cheese - Cheese is an application that takes photos and videos from your webcam.

  • Chess - GNOME Chess game

  • Corebird - A modern Gtk Twitter client

  • Cornucopia - Freesmartphone.org services middleware for mobile devices (2nd incarnation).

  • Cronopete - A backup utility, which aims to be a clone of Apple's Time Machine.

  • Dactl - Dactl is a configurations based application for creating custom data acquisition and control systems in the GNOME desktop environment(SCADA).

  • dactl-mcc-plugin - This plugin is an interface between Dactl and the MCC.

  • dconf editor - The dconf configuration editor

  • Déjà Dup - A backup utility.

  • Diodon - GTK clipboard manager.

  • Dockery - Dockery is a Docker GUI client written in Vala.

  • DVB Daemon - Daemon to setup your DVB devices, record and watch TV shows and browse EPG.

  • Ease - Presentation authoring tool for the GNOME desktop.

  • ev3devKit - This is a GLib/GObject based library that provides a number of programming interfaces for ev3dev, including user interface and device driver interface.

  • FeedReader - RSS desktop client

  • Folks - A library that aggregates people from multiple sources to create metacontacts.

  • Calculator - GNOME Calculator

  • Games - Simple game launcher for GNOME

  • Geary - An email application built for GNOME 3.

  • Gitg - git repository viewer for gtk/GNOME.

  • Gmail Notify - A Gmail notification app

  • Gnome Encfs Manager - A manager and mounter for EncFS stashes

  • Gnome media applet - A GNOME applet to simply mount/umount removable media

  • Gnome Pie - A visual application launcher for the Gnome Desktop

  • GNOME Scan - A scan library for GNOME

  • gst-plugins-cl - An OpenCL plugin for gstreamer written in vala

  • Haguichi - "Haguichi provides a graphical frontend for Hamachi on Linux", with an indicator for GNOME shell

  • i4uc - An IDE for micro-controllers

  • Iagno - Strategy game

  • Komorebi - "Komorebi is an awesome desktop manager for all Linux platforms. It provides fully customizeable image and video wallpapers that can be tweaked at any time!"

  • LaTeXila - An integrated LaTeX environment

  • Lights Off - Logic game

  • Listaller - A distro-agnostic application management and software installation tool based on PackageKit

  • Lucruri - Todo list and note taking application.

  • Mahjongg - Mahjongg game

  • Mines - Minesweeper game

  • Mipsdis - MIPS32 disassembler for stripped ELF (without section tables)

  • moserial - A serial terminal for the GNOME desktop.

  • Multiplication Puzzle - A puzzle game.

  • Mutiara - A motif designer based on fractals. (2015)

  • Paldo Installer - Installer for the Paldo Linux Distro.

  • openSage - a port of OpenSAGE from C# to Vala. OpenSAGE is a free, open source re-implementation of SAGE, the 3D real time strategy (RTS) engine used in Command & Conquer

  • elementary Mail - An email client application.

  • Pasang Emas - Traditional board game of Brunei.

  • PDF PC - A fork from PDF Presenter Console with several new options and enhancements.

  • peek - "Simple animated GIF screen recorder with an easy to use interface"

  • Picsaw - Jigsaw puzzle game

  • Plank - The world's simplest dock

  • GNOME Pomodoro - "GNOME Pomodoro is a small application that helps managing time according to Pomodoro Technique", source code on GitHub

  • Quadrapassel - Tetris game

  • Rygel - A collection of UPnP/DLNA media devices for GNOME

  • Selene - audio/video converter for audio and video files. It supports almost every file format that you are likely to come across and can encode them to popular output formats like MKV, MP4, etc.

  • Shotwell - A photo organizer.

  • Document Scanner - Scanner application

  • SmartSim - Visual digital logic design and simulation package.

  • Swell Foop - Puzzle game

  • https://github.com/elementary/switchboard - Modular desktop settings hub. (elementary)

  • systemd - Graphical frontend for the systemd system and service manager.

  • Tetravex - Puzzle game

  • Vala - The Vala compiler itself is written in Vala.

  • Vala Terminal - A lightweight terminal based on VTE.

  • Vinagre - A VNC Client for the GNOME Desktop. (Parts of Vinagre is written in Vala.)

  • XML Bird - XML parser (from FontBird project)

  • Xfmpc - A small MPD client.

  • Xfce4 Notes Plugin - A quick-to-scribble notes application.

  • Xfce4 Stopwatch Plugin - A plugin for the panel that keeps track of elapsed time

  • Xnoise - A media player.

  • Valum - Web framework for Vala. Inspired by sinatra and allows lua scripting.

  • Zeitgeist - Event logging framework

  • Vala-Lint - Check Vala code files for code-style errors

  • Enso-OS - xfce + pantheon DE

  • roojsbuilder - Vala and Javascript IDE - for building Vala Desktop applications and Javascript UI's using the roojs libraries (for bootstrap and classic)

  • Tracky - GNOME Application to track your activities (WIP)

  • OpenRiichi - OpenRiichi is an open source Japanese Mahjong client written in the Vala programming language

  • Dockery - Dockery is a Gtk3+ based GUI for managing docker images & containers written in Vala

  • pdfpc - is a GTK-based presentation application which uses Keynote-like multi-monitor output to provide meta information to the speaker during the presentation.

  • Timeshift - Timeshift for Linux is an application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS

  • Asteroids_Vala - Simple game using OpenGL

  • openloop - OpenLoop is an effort to create a sample looping environment for elementaryOS. It is heavily inspired by the Live Loops feature of GarageBand

elementary

  • Sequeler - SQL Client built in Vala

  • Karim - Graphical interface for command-line tool youtube-dl

  • Files - File browser designed for elementary OS

  • App Template - A template for desktop applications written in Vala

  • VServer - VServer opens an http server in the desired folder

  • Minder - Mind-mapping application for elementary OS

  • Spice-up - Create Simple and Beautiful presentations

  • FeedReader - Modern desktop application designed to complement existing web-based RSS accounts

Discontinued Projects(> 6 years)

  • Maja - Vala to Javascript compiler. (Last commit 2012)

  • SHR Project - SHR is a GNU/Linux based operating system for smartphones and similar mobile devices (2012)

  • libmodulo - Dependency Injection / Inversion of Control

  • Sampala - A sample Vala application demonstrating Autotools and i18n (2011)

  • Val(a)IDE - Small IDE for the Vala language (2012)

  • ValaWinPKG - Vala Package manager, install needed MinGW libraries on Windows®. (Use MSYS2 now)

  • AllTray - A program for docking software to the system tray/notification area

  • Asteroids_Vala- Simple game using OpenGl and SDL (2013)

  • Caméléon - Easy file converter. (2009)

  • Commandeer - A sysadmin tool to lock the desktop while a command runs. (2010)

  • DSync - Directory Sync - simple rsync frontend for Maemo and GNOME

  • Epris music player - A D-Bus service and command line client to listen to music. Unlike xmms2 or mpd, it uses GStreamer and D-Bus.

  • Fillmore - A Multitrack audio recorder for GNOME (2011)

  • Final Page - A tool to reorganize, split and merge PDF documents.(2009)

  • gradio - A GTK3 app for finding and listening to internet radio stations (still support but rewritten to Rust)

  • Hum - A lightweight music player built on DBus, Tracker, and GStreamer (2011)

  • Gwibber - Microblogging client. Prior to version 3.0, it was written in the Python programming language using the PyGTK library. Starting with version 3.0, it was completely rewritten in the Vala. Was included in Ubuntu 10.04 from box. In 2013 it was renamed to Friends and the frontend was rewritten in QML.

  • libvfcgi - FastCGI library for GObject/Vala. (2009)

  • Marlin - The sexiest fish in the large sea of file-browsers (Turned into an application Files for elementary)

  • Meiga - Light and easy content server for your desktop. (2010)

  • Mind Map Architect - Program for manipulating with mind maps (2012) (Use Minder pls)

  • MPRIS Applet - MPRIS client panel applet/plugin for GNOME and Xfce. (2011)

  • OMAP Media Apps - GStreamer and GTK based applications for the OMAP platform, written in Genie.

  • PDF Presenter Console - A Keynote like multi monitor "Presenter Console" using PDF as input. (Discontinued, A well maintained fork, with new functionality is available here)

  • People Project - Aims at providing an unified access to contacts for desktop applications. (2008)

  • Pino - A Twitter client.

  • Postler - ultra simple desktop mail client (2011)

  • PSchema - A framework for investigating artificial intelligence through the use of Piagetian schema learning.

  • RhythmPnP - Rhythmbox Universal Plug'N'Play Media Renderer Plugin (2011)

  • Scratchpad - Spatial text editor for the GNOME desktop. (2007)

  • Shishen Sho Mahjongg for Gtk and Maemo - A board game similar to Mahjong. (2008 Maemo)

  • Steadyflow - A simple download manager.

  • Synapse - A semantic file launcher

  • Synapse-project - A semantic file launcher (forked, author replaced it with rofi)

  • ValaTerm - A lightweight terminal emulator. (2012)

  • Valence - A simple PDF viewer. (2007)

  • Watray - A general purpose IDE. (2009)

  • Curl Vala - Object-oriented interface for libcurl written in Vala.

Companies that use/have used Vala

  • GNOME itself. If you sort GNOME repos by language label, you will see the number of GNOME repositories in this order: C: 225, Vala: 44 Python: 32, C++: 18

  • Nokia for Maemo

  • DocuMatrix - Outsourcing company for documentation and data processing. Has a proprietary library for vala (part of it is open).

  • Canonical for Unity DE (until 8 version)

  • elementary OS - Vala is the language of choice for elementary OS.

  • Radare2 Radare - Libre and Portable Reverse Engineering Framework

  • ev3dev - is a Debian Linux-based operating system that runs on several LEGO® MINDSTORMS compatible platforms including the LEGO® MINDSTORMS EV3 and Raspberry Pi-powered BrickPi. They use Vala for Brickman - some kind of DE for this little Lego screens. There also grx widgets toolkit and other stuff. You can find screenshots at end of this page

  • rooJSolutions - With over 15 years of specialised experience in Software Development and Linux Services, we have been developing business automation solutions for companies throughout the world from a variety of technology-dependent industries. Vala + JS IDE - App Builder, Demo Video

  • Frida - Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers.

  • Coanda - Coanda company - "Solving Industrial Problems Through Science & Technology". “We help our clients RESOLVE their TECHNICAL PROBLEMS, make their processes MORE EFFICIENT, and develop NEW TECHNOLOGY.”

  • Cable Labs - "At CableLabs, we’re all about inventing new ways to make broadband faster and better." They use Vala for something like a browser for their HTML5 TV interface.

  • RealMacSoftware - Make apps for Apple devices. They are proprietary so there is no link to the repository. But they indicated that they use Vala on stackshare.

  • BunsenLabs - BunsenLabs Linux Helium is a distribution offering a light-weight and easily customizable Openbox desktop.

  • Untangle - Untangle Provides a Comprehensive Approach to Security Orchestration. They are proprietary so there is no link to the repository. But they indicated that they use Vala on stackshare.

Projects/Vala/Documentation (last edited 2024-02-21 00:29:10 by ColinKiama)