1 stable release

1.0.0 Nov 7, 2022

#1324 in Data structures

47 downloads per month
Used in 2 crates (via cotton)

MIT license

7KB
114 lines

Latest Version Documentation License

Build command arguments.

use std::process::Command;
use mkargs::mkargs;

let world = "world".to_string();
let mut args = mkargs!["hello", world];

args.push_pair("foo", "bar");

Command::new("echo")
    .args(&*args)
    .spawn()
    .expect("echo command failed to start");

lib.rs:

Build command arguments.

use std::process::Command;
use mkargs::mkargs;

let world = "world".to_string();
let mut args = mkargs!["hello", world];

args.push_pair("foo", "bar");

Command::new("echo")
.args(&*args)
.spawn()
.expect("echo command failed to start");

No runtime deps