Skip to main content

load_plugins

Function load_plugins 

Source
pub fn load_plugins(
    cfg: Option<&Config>,
    xdg_env: &XdgEnv,
) -> Option<(PluginRegistry, Arc<Engine>)>
Expand description

Discover + compile plugins from cfg.plugin_dirs plus the XDG segments dir. Returns None when neither cfg.plugin_dirs is configured nor an XDG segments directory exists on disk — cold-start fast path that skips build_engine entirely. (Configured-but-missing entries in cfg.plugin_dirs take the Some path and surface as load errors on the registry.) Callers consume registry.load_errors() per their needs: the driver writes them to stderr; doctor classifies them across the plugins.compile / plugins.deps_valid / plugins.no_id_collisions / plugins.no_builtin_collisions check rows.