Open abitmore opened 6 years ago
So would this look like we specify a set of plugins at build, and then those plugins get built-in and loaded automatically, regardless of what the config.ini
says?
It is not the config the main problem, if the config loads a plugin that is not built then it will just throw or whatever.
The idea is for example if i want to use on my node only the account_history
plugin i should not be compiling all the rest of them, i should have an option to only build that plugin.
It is not a big issue right now as plugins dont take a lot of time to build but i am thinking that as we encourage devs to write plugins the number of them in the future can and will be bigger.
Main problem i think is the amount of code that will need to be refactored as the headers of plugins are included everywhere.
As an example we can currently build the programs we want by make witness_node
, that will build witness node and not the cli wallet nor other programs.
A similar option should be available for plugins.
I originally had the idea of plugin build options at cmake level, then check for them in the c++ to include plugin headers and to use plugin code; however this will make our code ugly with checks to include a header, a lot of conditionals, etc that i abandoned the idea.
This will also help us with the overall requirements of the bitshares-core. For example curl
is used only in the 2 elasticsearch plugins but it needs to be installed even if the user is for example a block producer and only want to use the witness node plugin.
I have other plugin prototypes, for example a lua plugin where lua is required to be installed in the machine, zeromq, postgres, etc. Currently, any plugin that uses a third party library will increase the requirements to build a node even if the user is not interested at all in the plugin features.
This would be useful.