add README
This commit is contained in:
parent
b6a4bb5a58
commit
11a8556250
1 changed files with 34 additions and 0 deletions
34
README.md
Normal file
34
README.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# C plugins
|
||||||
|
|
||||||
|
learning how to write a dynamic plugin loader in C!
|
||||||
|
|
||||||
|
## how does it work?
|
||||||
|
|
||||||
|
the core application will scan a nearby `plugins` directory for plugins.
|
||||||
|
the core expects this directory structure:
|
||||||
|
|
||||||
|
- `pluginhost`
|
||||||
|
- `plugins`
|
||||||
|
- `plugin1`
|
||||||
|
- `plugin1.so`
|
||||||
|
- `plugin2`
|
||||||
|
- `plugin2.so`
|
||||||
|
|
||||||
|
each plugin must minimally contain two functions:
|
||||||
|
- `int ari_plugin_load(void)`
|
||||||
|
- `int ari_plugin_unload(void)`
|
||||||
|
|
||||||
|
once loading all plugins, the core will call these functions within each
|
||||||
|
detected plugin, and exit.
|
||||||
|
|
||||||
|
## how to use
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> this software only supports linux at the moment. no plans to support other
|
||||||
|
> platforms at this time!
|
||||||
|
|
||||||
|
- `make` to build the core application
|
||||||
|
- `make all_plugins` to build all plugins
|
||||||
|
- `make all` to build both!
|
||||||
|
- `make clean` to tidy up the environment
|
||||||
|
- once built, run `./pluginhost` to test the application.
|
Loading…
Add table
Add a link
Reference in a new issue