rainbow-dash 0.1.1

Command execution library for Linux/macOS and Windows.
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented1 out of 7 items with examples
  • Size
  • Source code size: 5.73 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 276.22 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • SilkRose/Rarity
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SilkRose

Rainbow Dash

Command execution library for Linux/macOS and Windows.

Has functions with status and output variants.

Example usage:

Running a command that is the same on Linux/macOS and Windows:

let status = execute_command("echo 'Pinkie Pie is best pony!'")?;
println!("{}", status.success()); // true or false

Running a command with output that is the same on Linux/macOS and Windows:

let output = execute_command_with_return("echo 'Pinkie Pie is best pony!'")?;
println!("{}", String::from_utf8(output.stdout)?); // Pinkie Pie is best pony!

If your commands are different on Linux/macOS and Windows, you can use the target-specific functions:

#[cfg(not(target_os = "windows"))]
let status = execute_unix_command("ls -la");
#[cfg(target_os = "windows")]
let status = execute_windows_command("dir /a /w");
println!("{}", status.success()); // true or false