code_passenger 0.3.0

Scans a Rust workspace with klepto and does the writing: feature gates across every crate from one features document, proven by cargo check, Cargo.toml edits, file headers from the plan, and the history of it.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! `code-passenger`: runs the lines `code_passenger::lines` declares, and nothing else.

fn main() {
    let args: Vec<std::ffi::OsString> = std::env::args_os().skip(1).collect();
    let exe = std::env::current_exe().unwrap_or_else(|_| "code-passenger".into());
    let o = code_passenger::lines::run_argv(&args, &exe);
    print!("{}", o.stdout);
    eprint!("{}", o.stderr);
    match (&o.kept, &o.receipt) {
        (Some(file), _) => eprintln!("code-passenger: {} (exit {}), receipt {}", o.word, o.code, file.display()),
        (None, Some(r)) => eprintln!("code-passenger: {} (exit {}), receipt sha256:{}", o.word, o.code, stable_digest::StableDigest::sha256(r.stable_material()).as_str()),
        (None, None) => {}
    }
    std::process::exit(o.code);
}