Which languages does libpeas support?

試著忘記壹切 提交于 2019-12-13 07:25:35

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/18633753/which-languages-does-libpeas-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!