#scripting #shell #kit #arg #cmd #sh #os

yanked scriptkit

A simple scripting Tool Kit for Rust

1.0.1 Jan 6, 2023
1.0.0 Dec 20, 2022
0.1.9 Dec 20, 2022

#63 in #cmd

31 downloads per month

MIT license

4KB
78 lines

ScriptKit

A simple toolkit for shell scripting in Rust!

Basic Usage

use scriptkit::shell::{Cmd, Arg, shell_tools::null_sh};
#[allow(unused_imports)] 
use scriptkit::sys::{OS, os_eye::open};

fn print_host() {
    println!("Executed On: {:?}", open().name);
}

fn main() {
    // Construct your command!
    let cmd = Cmd::new("echo");
    
    // Construct your argument!
    let arg = Arg::new("Hello, World!");
    
    // Execute the command!
    null_sh(cmd, arg).expect("Failed to run command");
    
    print_host();
}

No runtime deps