Skip to content

Latest commit

 

History

History
171 lines (108 loc) · 4.48 KB

specification-plugin.rst

File metadata and controls

171 lines (108 loc) · 4.48 KB

Plugins

.. seealso::

   :ref:`tutorial-plugins`
     Examples demonstrating how to write |project| :term:`plugins <plugin>`

:term:`Plugins <plugin>` are loaded at initialization time

Selection and loading of :term:`plugins <plugin>` is configured using the usual configuration mechanism: for each implementation language of |project|, a language-specific section configures:

C++ Plugins

In the C++ implementation of |project|, :term:`plugins <plugin>` are shared objects defining symbols

  1. :c:func:`rsc_plugin_init`
  2. :c:func:`rsc_plugin_shutdown`

:term:`Plugins <plugin>` are configured via the configuration options

plugins.cpp.path

Colon-separated list of directories in which expanded (e.g. rsbspread -> :samp:`{DIRECTORY}/librsbspread.so` on Linux) plugin libraries will be searched.

An empty entry (e.g. :dots, dots::dots or dots:) is replace with the value configured in the respectively more generic configuration source, up to the default value.

plugins.cpp.load

Colon-separated list of plugins that should be loaded. (Names do not include prefixes like lib of suffixes like .so or .dll)

An empty entry (e.g. :dots, dots::dots or dots:) is replace with the value configured in the respectively more generic configuration source, up to the default value.

Configuration Examples:

[plugins.cpp]
path = /vol/vampire/lib/rsb0.8/plugins:/vol/cor/lib/rsb0.8/plugins
load = rsbspread:rsbvampire # no "libX" or filetype suffix like ".so"
RSB_PLUGINS_CPP_PATH=/vol/cor/lib/rsb0.8/plugins

The default searchpath for C++ :term:`plugins <plugin>` is

  1. :samp:`{HOME}/.rsb{VERSION}/plugins`
  2. :samp:`{PREFIX}/lib/rsb{VERSION}/plugins`

where :samp:`{HOME}` is the home directory of the current user, :samp:`{PREFIX}` is the prefix into which |project| has been installed and :samp:`{VERSION}` are the major and minor components of the current |project| version (|version| for this version). Example:

  1. :file:`/homes/juser/.rsb0.8/plugins`
  2. :file:`/usr/lib/rsb0.8/plugins`

Python Plugins

Warning

This section is work in progress.

Python :term:`plugins <plugin>` are :ref:`modules <python:tut-modules>` defining functions

  1. :py:func:`rsbPluginInit`
  2. :py:func:`rsbPluginShutdown`

:term:`Plugins <plugin>` are configured via the configuration options

plugins.python.path

Colon-separated list of directories which get added to :py:data:`sys.path`?

plugins.python.load

Colon-separated list of plugins that should be loaded.
.. todo:: default searchpath

Java Plugins

Warning

This section is work in progress.

Java :term:`plugins <plugin>` are Jar files?

:term:`Plugins <plugin>` are configured via the configuration options

plugins.java.path

TODO

plugins.java.load

Colon-separated list of plugins that should be loaded.
.. todo:: default searchpath

Common Lisp Plugins

Warning

This section is work in progress.

Common Lisp :term:`plugins <plugin>` are ASDF-systems or FASL-bundles?

:term:`Plugins <plugin>` are configured via the configuration options

plugins.lisp.path

Colon-separated list of directories that should be searched for plugins.

plugins.lisp.load

Colon-separated list of plugins that should be loaded.
.. todo:: default searchpath

Implementations

Language File(s)
C++ implemented as part of the RSC library
Java not yet implemented
Python not yet implemented
Common Lisp not yet implemented