dimvexa-cli 0.2.0

Command-line unit conversion tool built on dimvexa. Exact factors. Loud failures. Zero guessing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: MIT OR Apache-2.0
//! The `dimvexa` binary: a thin shell around [`dimvexa_cli::run`].

use std::io::Write as _;
use std::process::ExitCode;

fn main() -> ExitCode {
    let args: Vec<String> = std::env::args().skip(1).collect();
    let stdout = std::io::stdout();
    let stderr = std::io::stderr();
    let mut out = stdout.lock();
    let mut err = stderr.lock();
    let code = dimvexa_cli::run(args, &mut out, &mut err);
    let _ = out.flush();
    ExitCode::from(code)
}