mirror of
https://github.com/ahgamut/rust-ape-example.git
synced 2024-11-21 23:41:00 +00:00
27 lines
560 B
Rust
27 lines
560 B
Rust
// ./src/std_misc/process.md
|
|
|
|
|
|
use std::process::Command;
|
|
/*
|
|
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);
|
|
}
|
|
}*/
|
|
|
|
pub fn main() {
|
|
// part0();
|
|
}
|
|
|