pub fn discover_plugins(
global_plugin_dir: Option<&Path>,
project_plugin_dir: Option<&Path>,
cwd_plugin_dir: Option<&Path>,
) -> Vec<DiscoveredPlugin>Expand description
Discover installed plugins by scanning up to three directory tiers:
- Global:
{global_plugin_dir}/— user-installed plugins - Project:
{project_plugin_dir}/— project-specific plugins - Development:
{cwd_plugin_dir}/— in-development plugins (hot-reload)
Later tiers override earlier ones when the same plugin id is found.
Each directory is expected to have the structure used by install_packaged_plugin:
<plugin_id>/<version>/manifest.json + <wasm_file>
The development directory also supports a flat layout for convenience:
<plugin_id>/manifest.json + <wasm_file> (no version subdir)
Invalid manifests are warned and skipped — they never cause a hard failure.