Crates.io | mkargs |
lib.rs | mkargs |
version | 1.0.0 |
source | src |
created_at | 2022-11-07 16:42:42.607047 |
updated_at | 2022-11-07 16:42:42.607047 |
description | Build command arguments |
homepage | https://sr.ht/~jpastuszek/mkargs/ |
repository | https://git.sr.ht/~jpastuszek/mkargs |
max_upload_size | |
id | 707323 |
size | 7,536 |
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");