4 releases (breaking)

Uses new Rust 2024

0.4.0 Apr 23, 2026
0.3.0 Jun 2, 2025
0.2.0 May 21, 2025
0.1.0 Sep 27, 2023

#16 in HTTP client

Download history 3478/week @ 2026-02-23 3286/week @ 2026-03-02 2417/week @ 2026-03-09 2683/week @ 2026-03-16 2243/week @ 2026-03-23 2706/week @ 2026-03-30 2634/week @ 2026-04-06 2965/week @ 2026-04-13 2251/week @ 2026-04-20 1815/week @ 2026-04-27 1884/week @ 2026-05-04 1537/week @ 2026-05-11 1678/week @ 2026-05-18 1907/week @ 2026-05-25 2007/week @ 2026-06-01 2523/week @ 2026-06-08

8,203 downloads per month
Used in 11 crates (9 directly)

Apache-2.0

1MB
21K SLoC

MinIO Rust SDK for Amazon S3 Compatible Cloud Storage

CI docs.rs Slack Sourcegraph crates.io Apache V2 License

The MinIO Rust SDK is a Simple Storage Service (aka S3) client for performing bucket and object operations to any Amazon S3 compatible object storage service. It provides a strongly-typed, async-first interface to the MinIO and Amazon S3-compatible object storage APIs.

Each supported S3 operation has a corresponding request builder (for example: BucketExists, PutObject, UploadPartCopy), which allows users to configure request parameters using a fluent builder pattern.

All request builders implement the S3Api trait, which provides the async send method to execute the request and return a typed response.

Basic Usage

use minio::s3::MinioClient;
use minio::s3::creds::StaticProvider;
use minio::s3::http::BaseUrl;
use minio::s3::types::S3Api;
use minio::s3::response::BucketExistsResponse;

#[tokio::main]
async fn main() {
    let base_url = "http://localhost:9000".parse::<BaseUrl>().unwrap();
    let static_provider = StaticProvider::new("minioadmin", "minioadmin", None);
    let client = MinioClient::new(base_url, Some(static_provider), None, None).unwrap();

    let exists: BucketExistsResponse = client
        .bucket_exists("my-bucket")
        .send()
        .await
        .expect("request failed");

    println!("Bucket exists: {}", exists.exists);
}

Features

  • Request builder pattern for ergonomic API usage
  • Full async/await support via tokio
  • Strongly-typed responses
  • Transparent error handling via Result<T, Error>

Design

  • Each API method on the MinioClient returns a builder struct
  • Builders implement ToS3Request for request conversion and S3Api for execution
  • Responses implement FromS3Response for consistent deserialization

Examples

You can run the examples from the command line with:

cargo run --example <example_name>

The examples below cover several common operations. You can find the complete list of examples in the examples directory.

file_uploader.rs

file_downloader.rs

object_prompt.rs

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

Dependencies

~19–42MB
~649K SLoC