Skip to main content

Module plugins

Module plugins 

Source
Expand description

Runtime plugin discovery + load. Wraps PluginRegistry::load_with_xdg plus the cold-start fast path.

Functions§

load_plugins
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.
xdg_segments_dir
$XDG_CONFIG_HOME/linesmith/segments/ (with $HOME fallback) per the cascade in crate::data_context::xdg::resolve_subdir. None when neither env var is populated.