Skip to main content

run_engine

Function run_engine 

Source
pub fn run_engine(
    command: Command,
    timeout: Duration,
    output_cap: usize,
) -> Result<Vec<u8>, RefusalReason>
Expand description

Runs command to completion, capturing stdout under output_cap bytes and timeout wall-clock time. command’s stdin is closed and stderr is discarded – only stdout carries the candidate artifact bytes.

Returns the captured bytes on a clean, in-budget exit; otherwise one of the three broken-run reasons this function alone can produce (engine-killed, engine-timeout, output-bounded). Never touches the filesystem.