Craftd:Plugins

Plugins
Plugins for Craftd are placed in subdirectories under the  directory. It is standard to have, in which the following statements are needed to do much of value:

Writing a plugin is pretty simple, you just have to create a loadable object with the 2 following functions:

It's advised to use the hash in PRIVATE(self) instead of global static variables to keep the data, in this way other plugins can work with the data of your plugin if they want to.

Building Plugins
There are no requirements on specific build systems when writing plugins.

craftd uses autotools, and more specifically, libtool internally. craftd uses lt_dlopenext to load your plugins, so it will correctly load i.e. .so, .sl, .dylib, .dll as appropriate for the system you are running on.

Note, however, that using libtool is advised to make using your plugin possible on many system types.

pkg-config files will be added in the future to ease cflag and include requirements for build/linkage.