This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
MinIO C++ SDK is an S3-compatible object storage client library. This fork extends the upstream minio-cpp with RDMA (Remote Direct Memory Access) support for high-performance data transfers, over RoCE or native InfiniBand, into host or GPU memory.
- CMake 3.13.4+
- C++17 compiler
- vcpkg package manager (set
VCPKG_ROOTenvironment variable) libs3rdmavendored undervendor/s3rdma/(for RDMA support). Build and vendor it for both arches with./build-libs.shin the sibling s3rdma repo.
# Configure both Debug and Release builds (recommended)
./configure.sh -DMINIO_CPP_TEST=ON
# Or configure manually for Debug
cmake . -B build/Debug -DCMAKE_BUILD_TYPE=Debug -DMINIO_CPP_TEST=ON
# Build
cmake --build ./build/DebugMINIO_CPP_TEST=ON- Build tests and examplesMINIO_CPP_MAKE_DOC=ON- Build Doxygen documentationBUILD_SHARED_LIBS=ON- Build shared library (default is static)
./build/Debug/testsExamples are built when MINIO_CPP_TEST=ON. Run individual examples:
./build/Debug/MakeBucket
./build/Debug/PutObject
./build/Debug/GetPutRDMA # RDMA-specific example
./build/Debug/GPUHostDisk # GPU Direct Storage exampleminio::s3::Client(include/miniocpp/client.h,src/client.cc) - Main S3 client class with high-level operations (UploadObject, DownloadObject, etc.)minio::s3::BaseClient(include/miniocpp/baseclient.h,src/baseclient.cc) - Base class implementing low-level S3 API operations and request execution
args.h- Argument structs for each S3 operation (e.g.,PutObjectArgs,GetObjectArgs)response.h- Response types returned by operationsrequest.h- HTTP request constructionhttp.h- HTTP client abstraction using httplib
providers.h/credentials.h- Credential providers (StaticProvider, EnvProvider, etc.)signer.h- AWS Signature V4 request signing
rdma_client.h-minio::rdma::Client, a thin RAII wrapper over thelibs3rdmaclient C API (register / mint token / classify pointer), plus the process-wideminio::rdma::Shared()accessorrdma.h- RDMA transport layer: token minting plus the S3 signing and HTTP control plane that carriesx-amz-rdma-token
The SDK is the RDMA passive side: it pins the caller's buffer, mints a token
describing it, and sends that token on an ordinary signed HTTP request. The
server performs the one-sided transfer (READ for a PUT, WRITE for a GET) and
reports the outcome in x-amz-rdma-reply; a 501 means the server declined
RDMA and the caller falls back to HTTP.
- cpp-httplib - HTTP client
- inih - INI file parsing for config
- nlohmann-json - JSON handling
- openssl - TLS/crypto
- pugixml - XML parsing for S3 responses
RDMA needs no additional system dependency at build time: libs3rdma is vendored, and it resolves the RDMA stack itself at runtime.
- Do not add obvious comments (e.g., "Safe: Validate() ensures X has value")
- Use
std::optional<T>for values that may be uninitialized (not sentinel values like-1for unsigned types) - RDMA buffers require page-aligned memory - use
posix_memalignorstd::aligned_alloc(C++17)