watf 0.0.1

Local CLI harness for agents with indexed validation and bounded execution
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::process::ExitCode;
fn main() -> ExitCode {
    let args = std::env::args_os()
        .skip(1)
        .map(|arg| {
            arg.into_string()
                .map_err(|_| watf::Error::message("arguments must be UTF-8"))
        })
        .collect::<watf::Result<Vec<_>>>();
    match args.and_then(watf::cli::run) {
        Ok(code) => ExitCode::from(code as u8),
        Err(error) => {
            eprintln!("watf: {}", watf::text::compact(&error.to_string(), 1000));
            ExitCode::from(2)
        }
    }
}