Expand description
Dynamic plugin loader using libloading.
Scans ~/.room/plugins/ for shared libraries (.so on Linux, .dylib on
macOS) and loads them via the C ABI entry points defined in
room_protocol::plugin::abi.
Each loaded plugin goes through three stages:
- Load the shared library
- Read the
ROOM_PLUGIN_DECLARATIONstatic to verify API/protocol compat - Call
room_plugin_createto obtain aBox<dyn Plugin>
On drop, the loader calls room_plugin_destroy before unloading the library.
Structs§
- Loaded
Plugin - A dynamically loaded plugin and its backing library handle.
Enums§
- Load
Error - Errors that can occur when loading a plugin.
Functions§
- load_
plugin - Load a plugin from a shared library at the given path.
- scan_
plugin_ dir - Scan a directory for plugin shared libraries and load each one.