valabind(1)

valabind1

Vala to swig interface conversor

Usage

valabind [-h] [-x] [-v] [-V vapidir] [-o ofile] [-m modname] [-p profile] [-N namespace] [-D SYMBOL] [--swig] [--node-ffi] [--ctypes] [--gir] [--cxx] vapifile

Overview

Valabind is a program written in Vala that aims to generate nodejs, c++ or SWIG interfaces (.i) from a vala-generated or hand-made vapi files.

SWIG opens the door to create bindings for Python, Perl, ruby, lua, and many other scripting languages.

-h

show help message

-o OUTPUT

specify output file name

-m NAME

specify module name

-N NS

include given namespace for processing

-D SYMBOL

define a preprocessor symbol inside Vala code

-p PROFILE

select Vala profile (posix, gobject, dova)

-x

generate c++ code for SWIG bindings

-v

show version information

-V PATH

specify an alternative vapidir path

Notes

Valabind processes a single module at a time: the module named with -m is the only one whose classes, structs, enums and methods are emitted in the output. Any additional vapifile arguments passed on the command line are not processed as independent modules — only the first class of the first file ends up being walked.

To resolve types that come from other modules (e.g. a r_core.vapi that references symbols declared in r_asm.vapi), drop the extra vapis and their sibling .deps files under the directory passed to -V VAPIDIR and invoke valabind with just the single positional vapi you want emitted. Reproducing the pipeline by hand with every .vapi on the command line is a common mistake and will silently produce a nearly empty binding.

Environment

XDG_DATA_DIRS

Standard freedesktop environment variable to point to the share prefix directory where vala looks for vapi files.

Hyper-references

Vala

http://live.gnome.org/Vala

SWIG

http://www.swig.org

Releases

8 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8–9
  3. 10–13
  4. Arch

-D since Debian 8 (Jessie); -N since Debian 8 (Jessie); -V since Debian 8 (Jessie); -h since Debian 8 (Jessie); -m since Debian 8 (Jessie); -o since Debian 8 (Jessie); -p since Arch Linux 2026-11-01; -v since Debian 8 (Jessie); -x since Debian 8 (Jessie).

--camel-getters until Debian 13 (Trixie); --ctypes until Debian 13 (Trixie); --cxx until Debian 13 (Trixie); --cxx-swig until Debian 13 (Trixie); --define until Debian 13 (Trixie); --dlang until Debian 13 (Trixie); --gir until Debian 13 (Trixie); --glib until Debian 13 (Trixie); --go until Debian 13 (Trixie); --help until Debian 13 (Trixie); --include-dir until Debian 13 (Trixie); --library until Debian 13 (Trixie); --module until Debian 13 (Trixie); --namespace until Debian 13 (Trixie); --node-ffi until Debian 13 (Trixie); --output until Debian 13 (Trixie); --pkg until Debian 13 (Trixie); --swig until Debian 13 (Trixie); --vapidir until Debian 13 (Trixie); --version until Debian 13 (Trixie); -I until Debian 13 (Trixie); -l until Debian 13 (Trixie).