Provides extension methods and resource definitions for the Aspire AppHost to support running RustFs containers.
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.RustFs
Then, in the Program.cs file of AppHost, add a RustFs resource and consume the connection using the following methods:
var builder = DistributedApplication.CreateBuilder(args);
var rustfs = builder.AddRustFs("rustfs")
.WithDataVolume()
.AddBucket("mybucket");
builder.Build().Run();AddBucket registers each bucket as a child RustFsBucketResource so it appears in
the Aspire Dashboard. After the RustFs server becomes healthy, the integration issues
a signed S3 PUT /{bucket} request from the AppHost process to provision the bucket;
there is no minio/mc sidecar container.
Multiple buckets can be added at once via AddBucket(IReadOnlyList<string>):
builder.AddRustFs("rustfs")
.AddBucket(["images", "documents", "audit-log"]);