#reqsign #async #command

reqsign-file-read-tokio

Tokio-based file reader 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

#617 in Asynchronous

Download history 3308/week @ 2025-09-30 8745/week @ 2025-10-07 7869/week @ 2025-10-14 12197/week @ 2025-10-21 13094/week @ 2025-10-28 13429/week @ 2025-11-04 16699/week @ 2025-11-11 23881/week @ 2025-11-18 37537/week @ 2025-11-25 36179/week @ 2025-12-02 45099/week @ 2025-12-09 70548/week @ 2025-12-16 20995/week @ 2025-12-23 21813/week @ 2025-12-30 25586/week @ 2026-01-06 40522/week @ 2026-01-13

115,787 downloads per month
Used in 34 crates (8 directly)

Apache-2.0

81KB
1K SLoC

reqsign-file-read-tokio

Tokio-based file reading implementation for reqsign.


This crate provides TokioFileRead, an async file reader that implements the FileRead trait from reqsign_core using Tokio's file system operations.

Quick Start

use reqsign_core::Context;
use reqsign_file_read_tokio::TokioFileRead;

// Create a context with Tokio file reader
let ctx = Context::new(
    TokioFileRead::default(),
    http_client, // Your HTTP client
);

// Read files asynchronously
let content = ctx.file_read("/path/to/file").await?;

Features

  • Async File I/O: Leverages Tokio's async file system operations
  • Zero Configuration: Works out of the box with sensible defaults
  • Lightweight: Minimal dependencies, only what's needed

Use Cases

This crate is essential when:

  • Loading credentials from file system (e.g., ~/.aws/credentials)
  • Reading service account keys (e.g., Google Cloud service account JSON)
  • Accessing configuration files for various cloud providers

Examples

Reading Credentials

Check out the read_credentials example to see how to read credential files:

cargo run --example read_credentials -- ~/.aws/credentials

Integration with Services

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

// Create context with Tokio file reader
let ctx = Context::new(
    TokioFileRead::default(),
    ReqwestHttpSend::default(),
);

// Use with any service that needs file access
let signer = Signer::new(ctx, loader, builder);

Requirements

  • Tokio runtime with fs feature enabled
  • Compatible with all reqsign service implementations

License

Licensed under Apache License, Version 2.0.

Dependencies

~5.5–9MB
~152K SLoC