Skip to main content

load_dir

Function load_dir 

Source
pub fn load_dir(
    dir: impl AsRef<Path>,
    diagnostics: Arc<dyn PluginDiagnostics>,
    action_bridge: Option<Arc<ActionBridge>>,
) -> Vec<LoadedPlugin>
Expand description

Load every cdylib in dir (non-recursive). Each load failure is logged via diagnostics and skipped (one bad plugin doesn’t abort the rest). Returns the successfully loaded plugins in directory order.

action_bridge (B5a) is cloned into each loaded plugin’s vtable user_data so post-register runtime_action calls recover the bridge on any thread.