command-group

Crates.iocommand-group
lib.rscommand-group
version5.0.1
sourcesrc
created_at2021-07-20 08:39:50.790222
updated_at2023-11-18 08:46:38.642104
descriptionExtension to Command to spawn in a process group
homepagehttps://github.com/watchexec/command-group
repositoryhttps://github.com/watchexec/command-group
max_upload_size
id425042
size282,734
FĂ©lix Saparelli (passcod)

documentation

https://docs.rs/command-group

README

Crate release version Crate license: Apache 2.0 or MIT CI status

Command Group

Extension to Command to spawn in a process group.

  • API documentation.
  • Dual-licensed with Apache 2.0 and MIT.
  • Minimum Supported Rust Version: 1.68.0.
    • Only the last five stable versions are supported.
    • MSRV increases within that range at publish time will not incur major version bumps.

Quick start

[dependencies]
command-group = "5.0.1"
use std::process::Command;
use command_group::CommandGroup;

let mut child = Command::new("watch").arg("ls").group_spawn()?;
let status = child.wait()?;
dbg!(status);

Async: Tokio

[dependencies]
command-group = { version = "5.0.1", features = ["with-tokio"] }
tokio = { version = "1.10.0", features = ["full"] }
use tokio::process::Command;
use command_group::AsyncCommandGroup;

let mut child = Command::new("watch").arg("ls").group_spawn()?;
let status = child.wait().await?;
dbg!(status);

Also see the Examples!

Commit count: 124

cargo fmt