[arch-general] Using libalpm with Vala
remyoudompheng at gmail.com
Fri Jan 14 17:35:31 EST 2011
I became recently interested in Vala, and I did several experiments to
try interfacing it with libalpm. Vala is an object-oriented language
created to be used mainly with glib2/gtk, and writing Vala bindings is
especially lightweight : it is only a matter of writing a "dictionary"
between C functions and methods. I think it might be a nice
alternative to C when writing small command line or GTK utilities.
I have put an example of how the C version of pactree would be written
in Vala, at
Memory management is especially tricky, as I am new to Vala, and not
very familiar with the internals of libalpm. So for the moment, only a
very small set of functions are wrapped and this version of pactree
does not segfault. Feel free to make any comments.
More information about the arch-general