Which languages does libpeas support?

317 views Asked by At

The plugin description for a libpeas plugin contains a line determining the Loader and with this the programming language the plugin is written in. It seems the documentation includes not list of available languages. Inspecting the git repository of the project, a top-level directory "Loaders" can be found listing entries for

  • c,
  • gjs,
  • seed and
  • python.

It is unclear also if the python version expected is 2 or 3.

These are by far fewer languages that the related gobject introspection provides support for.

Are the listed 4 all available loaders? Or do external projects exist that provides more loaders?

2

There are 2 answers

0
nemequ On

AFAIK yes, those are all the loaders which are available, though it would make much more sense to ask on an official libpeas forum (like the mailing list or IRC channel) than on SO.

Vala uses the C loader, and can be used with libpeas.

Also, a lot of the projects listed on that site aren't in particularly good shape. For example, JGIR is probably in better shape than most (IIRC there is a GSoC student working on it right now), but it can't handle out or inout parameters. A libpeas loader isn't really necessary until the language is actually usable with GI.

0
SkyzohKey On

For people that would needs a list of supported loaders, i think this may be useful.

As stated on the valadoc page for libpeas-1.0/Peas.Engine.enable_loader ยน :

  • C : The C plugin loader is always enabled ;
  • lua5.1 : Lua 5.1 loader - Example ;
  • python : Python2 loader ;
  • python3 : Python3 loader - Example.
  • gjs : GJS loader - EDIT: Seems to have been disconstinued.

I suppose that using the C loader may works for Genie plugins too.