Expand description
Generic dlopen loading.
§No type erasure here
T is the host’s own #[repr(C)] entry struct (for bmux, that is
BmuxPluginV1). load() returns a *const T — a thin pointer, not a dyn Trait
— so there is no “convert a fat pointer between two different vtables” UB.
This crate neither knows nor needs to know which fields T has; it only reads
the symbol address and casts it to *const T. Reading those fields safely is the
host contract crate’s job.
§What the caller has to guarantee
Tand the struct the plugin actually exports have the same layout (backed by the host’sabi_versionfield);- every read of a field of
Tis wrapped incrate::panic::guard.
Structs§
- Loaded
Plugin - A loaded plugin.
Functions§
- find_
library - Finds a cdylib in a directory by walking the candidate list, returning the first one that exists.
- library_
candidates - The cdylib file name candidates for this platform, in priority order.
- open⚠
- Opens a cdylib and calls its entry function.