Expand description
Topological sorters for the NuSy crate dependency graph and function call graph.
Provides two flavours of Kahn’s BFS topological sort:
-
Crate-level — order workspace crates for compilation.
sort_crates— flattened build order (Vec) sort_crates_parallel— layered order; crates in the same layer may build concurrently
-
Function-level (intra-crate) — order functions by call dependency.
sort_functions_in_crate— flattened call order (Vecof node IDs) sort_functions_parallel— layered call order
All algorithms use named column constants (never magic indices) and return
Err(String) for cycle detection or schema mismatches.
Structs§
- Parallelism
Stats - Statistics about the parallel layer decomposition of a workspace.
Functions§
- crate_
parallelism_ stats - Compute parallelism statistics for the workspace crate build graph.
- sort_
crates - Topologically sort workspace crate names using Kahn’s algorithm.
- sort_
crates_ parallel - Return independent parallel build layers for workspace crates.
- sort_
functions_ in_ crate - Topologically sort functions within a crate by call dependency order.
- sort_
functions_ parallel - Return independent parallel execution layers for functions within a crate.