Skip to main content

build_workload_root_kernel

Function build_workload_root_kernel 

Source
pub fn build_workload_root_kernel(
    parent: &ScopeKernel,
    ops: &[ParsedOp],
    source_dir: Option<&Path>,
    polydat_lib_paths: Vec<PathBuf>,
    strict: bool,
    extra_required: &[String],
    context: &str,
    cursor_limit: Option<u64>,
    workload_params: &HashMap<String, String>,
    workload_level_polydat: Option<&str>,
) -> Result<ScopeKernel, String>
Expand description

Build the workload-root ScopeKernel as a subscope of the workload-params kernel.

The workload-root is “just another scope” per SRD-67 §“Composition with SRD-66”: it goes through the same source-matter construction every other scope uses (ScopeKernel::build_under). The specialised content for the root is:

  • Op-level bindings (rare at root; most workloads put bindings at the workload or phase level).
  • The workload’s bindings: block, ingested as Inherited matter.
  • Workload params as const bindings — descendants pick them up via the standard manifest auto-extern.
  • DCE filter that retains every workload param plus caller-supplied config refs (cycles= etc.).

Replaces the prior compile_bindings_with_libs_excluding function — the “_excluding” suffix referred to a now-defunct exclude parameter, and the function carried a legacy semicolon-chain Map-bindings branch that no shipped workload shape exercises (workload params are always present, so the needs_scope gate always picked the modern path).