Expand description
CratePluginKit: the facade of this crate.
§The generic parameter T
T is the host’s own #[repr(C)] entry struct. This crate does not use any of
its fields — it only appears in the return type of CratePluginKit::load, to
turn the symbol dlopen produced into a thin pointer *const T.
That removes the “type erasure → restore” layer: there is no conversion of a fat pointer between two vtables, and therefore no UB of that kind.
§Thread safety
CratePluginKit holds a RefCell recording which plugins this process has
loaded (used by CratePluginKit::uninstall to refuse deleting a library that
is in use). It is therefore not Sync — build one per process and use it
serially (which is what a CLI does). To go concurrent, give each thread its own
kit in its own scope.
§Layout
The struct, its construction and its accessors are here. The methods that make up
the API surface are split by concern into the private install submodule (install /
update / uninstall), list (queries) and load (dlopen), which build the same
impl block.
Structs§
- Crate
Plugin Kit - Generic plugin management library.
- Plugin
Info - An overview of one installed plugin.