Skip to main content

run

Function run 

Source
pub fn run(project_root: &Path) -> Result<(), WorkflowError>
Expand description

Loads, preflights, and executes the Workflow project rooted at project_root.

This is the sole ordinary application entry point. Project loading and Study compilation finish before Runtime receives the validated immutable Study. Successful completion returns (); advanced integrations can load an embedding integration can load a study::Study and call runtime::execute to retain a read-only run summary.

Recognizes --clean in process arguments before an optional -- delimiter. After preflight, this clears <project_root>/output while holding exclusive project ownership. Symlink output roots, active runs, and reuse sources in that directory are rejected. Other application arguments are ignored. Embedding through runtime::execute never reads process arguments. Execution requires terminal stdin and stderr for the dashboard; use screen or tmux. A missing terminal fails before output creation or cleanup.