rustclamp-tooling 0.5.0

Developer inspection commands for resolved Clamp process models.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The `cli` profile: one command per run. Results go to stdout, usage errors
//! to stderr, and the outcome is the exit code: 0 done, 2 bad usage.

/// Runs the command in `args` and returns the process exit code.
pub fn run(args: &[String]) -> u8 {
    match args.first().map(String::as_str) {
        None | Some("hello") => {
            println!("Hello from Clamp!");
            0
        }
        Some(command) => {
            eprintln!("unknown command {command:?}");
            2
        }
    }
}