The Hanzo S3 Rust SDK is an S3-compatible client for performing bucket and object operations against Hanzo S3 (s3.hanzo.ai / hanzo.space) and any Amazon S3-compatible object storage service.
It provides a strongly-typed, async-first interface with a fluent builder pattern for every supported S3 operation.
- Server: github.com/hanzoai/s3
- SDK: github.com/hanzos3/rust-sdk
- Endpoint:
s3.hanzo.ai/hanzo.space
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 = "https://s3.hanzo.ai".parse::<BaseUrl>().unwrap();
let static_provider = StaticProvider::new("ACCESS_KEY", "SECRET_KEY", None);
let client = MinioClient::new(base_url, Some(static_provider), None, None).unwrap();
let exists: BucketExistsResponse = client
.bucket_exists("my-bucket")
.unwrap()
.build()
.send()
.await
.expect("request failed");
println!("Bucket exists: {}", exists.exists());
}- Request builder pattern for ergonomic API usage
- Full async/await support via
tokio - Strongly-typed responses
- Transparent error handling via
Result<T, Error> - Compatible with any S3-compatible storage (AWS S3, Hanzo S3, etc.)
- Each API method on the
MinioClientreturns a builder struct - Builders implement
ToS3Requestfor request conversion andS3Apifor execution - Responses implement
FromS3Responsefor consistent deserialization
Run examples from the command line:
cargo run --example <example_name>See the examples/ directory for the complete list.
This SDK is distributed under the Apache License, Version 2.0. See LICENSE for details.