Skip to main content

run

Function run 

Source
pub fn run(
    out: &mut dyn Write,
    args: &ValidateArgs,
) -> Result<ValidateReport, CliError>
Expand description

Run astrs validate, writing a human or JSON report to out.

Every problem with the manifest itself becomes a CliDiagnostic in the rendered report rather than an Err — see this module’s docs for why a diagnostic tool reports rather than aborts. The proof results join the same list on the same terms; see this module’s header for how they map onto the exit-code scale.

§Errors

Returns CliError::Io if writing to out fails, or CliError::ProofUnavailable if --prove reached the proving stage on a build without the verify feature. In the latter case the report — including every encoded obligation — has already been written to out. A --prove run that never got that far (an unparseable manifest, a profile that does not match) reports that instead, on the ordinary exit-code scale.