rust-ape-example/src/bin/std_misc_process.rs

28 lines
560 B
Rust
Raw Normal View History

// ./src/std_misc/process.md
use std::process::Command;
2022-09-07 05:19:49 +00:00
/*
fn part0() {
let output = Command::new("rustc")
.arg("--version")
.output().unwrap_or_else(|e| {
panic!("failed to execute process: {}", e)
});
if output.status.success() {
let s = String::from_utf8_lossy(&output.stdout);
print!("rustc succeeded and stdout was:\n{}", s);
} else {
let s = String::from_utf8_lossy(&output.stderr);
print!("rustc failed and stderr was:\n{}", s);
}
2022-09-07 05:19:49 +00:00
}*/
pub fn main() {
2022-09-07 05:19:49 +00:00
// part0();
}