#reqsign #async #command

reqsign-command-execute-tokio

Tokio-based command execution implementation for reqsign

3 stable releases

Uses new Rust 2024

2.0.1 Nov 3, 2025
2.0.0 Oct 8, 2025
1.0.0 Sep 1, 2025

#1810 in Asynchronous

Download history 3335/week @ 2025-09-30 7695/week @ 2025-10-07 7843/week @ 2025-10-14 12180/week @ 2025-10-21 13081/week @ 2025-10-28 12695/week @ 2025-11-04 16655/week @ 2025-11-11 16105/week @ 2025-11-18 12213/week @ 2025-11-25 16087/week @ 2025-12-02 14109/week @ 2025-12-09 14534/week @ 2025-12-16 7137/week @ 2025-12-23 11859/week @ 2025-12-30 22399/week @ 2026-01-06 33456/week @ 2026-01-13

76,667 downloads per month
Used in 30 crates (3 directly)

Apache-2.0

80KB
1K SLoC

Tokio-based command execution implementation for reqsign.

This crate provides TokioCommandExecute, an async command executor that implements the CommandExecute trait from reqsign_core using Tokio's process operations.

Overview

TokioCommandExecute enables reqsign to execute external commands asynchronously using Tokio's process spawning capabilities. This is particularly useful when retrieving credentials from external programs or CLI tools.

Example

use reqsign_core::Context;
use reqsign_command_execute_tokio::TokioCommandExecute;
use reqsign_file_read_tokio::TokioFileRead;
use reqsign_http_send_reqwest::ReqwestHttpSend;

#[tokio::main]
async fn main() {
    // Create a context with Tokio command executor
    let ctx = Context::new()
        .with_file_read(TokioFileRead::default())
        .with_http_send(ReqwestHttpSend::default())
        .with_command_execute(TokioCommandExecute::default())

        .unwrap();

    // The context can now execute commands asynchronously
    match ctx.command_execute("echo", &["hello", "world"]).await {
        Ok(output) => {
            if output.success() {
                println!("Output: {}", String::from_utf8_lossy(&output.stdout));
            }
        }
        Err(e) => eprintln!("Failed to execute command: {}", e),
    }
}

Usage with Service Signers

use reqsign_core::{Context, Signer};
use reqsign_command_execute_tokio::TokioCommandExecute;
use reqsign_file_read_tokio::TokioFileRead;
use reqsign_http_send_reqwest::ReqwestHttpSend;

# async fn example() -> anyhow::Result<()> {
// Cloud services that use external credential processes need command execution
let ctx = Context::new()
    .with_file_read(TokioFileRead::default())
    .with_http_send(ReqwestHttpSend::default())
    .with_command_execute(TokioCommandExecute::default())
    ?;

// Create a signer that can execute credential helper processes
// let signer = Signer::new(ctx, credential_loader, request_builder);
# Ok(())
# }

Dependencies

~8–12MB
~191K SLoC