use std::io::{self, Read, Write};
use std::process::ExitCode;
use interior_point::cli::run::run;
fn main() -> ExitCode {
let argv: Vec<String> = std::env::args_os()
.skip(1)
.map(|arg| arg.to_string_lossy().into_owned())
.collect();
let mut out = io::stdout().lock();
let mut err = io::stderr().lock();
let mut read_stdin = || -> io::Result<String> {
let mut buffer = String::new();
io::stdin().read_to_string(&mut buffer)?;
Ok(buffer)
};
let code = run(&argv, &mut out, &mut err, &mut read_stdin);
let _ = out.flush();
ExitCode::from(code as u8)
}