Skip to main content

topological_sort_plugins

Function topological_sort_plugins 

Source
pub fn topological_sort_plugins(
    plugin_names: &[String],
    dependencies: &HashMap<String, Vec<String>>,
) -> Result<Vec<String>>
Expand description

Topological sort of plugins by dependency order (dependencies first).

Returns Ok(sorted_names) with plugins in load order, or Err(cycle) with the names of plugins involved in a dependency cycle.

Plugins with no dependencies are sorted alphabetically for determinism.