mkargs

Crates.iomkargs
lib.rsmkargs
version1.0.0
sourcesrc
created_at2022-11-07 16:42:42.607047
updated_at2022-11-07 16:42:42.607047
descriptionBuild command arguments
homepagehttps://sr.ht/~jpastuszek/mkargs/
repositoryhttps://git.sr.ht/~jpastuszek/mkargs
max_upload_size
id707323
size7,536
Jakub Pastuszek (jpastuszek)

documentation

https://docs.rs/mkargs

README

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");
Commit count: 0

cargo fmt