# pcb-rnd - plugin development - external fungw plugin

First of all: you should write a core plugin, not an external plugin.

If you absolutely can't avoid writing an external plugin, you have two choices: a native puplug plugin or a fungw engine plugin. This page is about the fungw plugin method. Pros: simpler code, less boilerplate. Cons: loaded like a script, shouldn't access pcb-rnd APIs other than actions, requires system installed (full featured) fungw.

Note: this method is equivalent to using a script language and writing an user script - except that it's written in C, needs to be compiled, and if crashes, will bring down the whole process with it.

Please refer to the example/template plugin. After make, the resulting .so can be loaded from pcb-rnd using the script() action:

    LoadScript(foo, ./ext_bar.so, c)

The stderr message from init should appear. The ExtBar action should be available.

To start your external plugin, copy it to new directory and rename ext_bar both in file names and file content. Please preserve the ext_ prefix.

## how to develop the plugin

Some naming conventions differ from core plugin development. It is not possible to register action help and syntax at the moment.

## Other considerations

As documented for puplug plugins.