Watch Aspire live streamsDocumentationEssayer Aspire

Get started with the RustFS integration

Ce contenu n’est pas encore disponible dans votre langue.

⭐ Community Toolkit

RustFS is an S3-compatible object storage server. The Community Toolkit integration runs RustFS as an AppHost container, exposes its S3 and console endpoints, and can provision buckets when the server is ready.

  • Add storage as a named resource and reference it from other AppHost resources.
  • Provision one or more buckets without a separate mc container.
  • Persist objects in a Docker volume or a host bind mount.
  • View the storage service and each bucket resource in the Aspire dashboard.
  • The Aspire CLI and the other Aspire prerequisites.
  • Docker to run the RustFS container.
  • An S3-compatible client in each consuming application. The Toolkit package provides hosting APIs, not a client library.

The hosting package starts the RustFS container and exposes the S3 endpoint and web console. When the AppHost references the resource, Aspire provides an endpoint and credentials to the dependent app. The integration can also create buckets after the S3 endpoint is ready.

architecture-beta
  group apphost(server)[AppHost]
  group rustfs(server)[RustFS container]
  service hosting(server)[RustFS hosting integration] in apphost
  service resource(disk)[RustFS resource] in apphost
  service s3(api)[S3-compatible API] in rustfs
  service console(server)[Web console] in rustfs
  service app(server)[Application]
  hosting:R --> L:resource
  resource:R --> L:s3
  resource:R --> L:console
  app:L --> R:s3
  1. Install the hosting package in the AppHost.

    Aspire CLI — Ajouter le package CommunityToolkit.Aspire.Hosting.RustFs
    aspire add rustfs

    La CLI Aspire est interactive ; choisissez le résultat approprié lorsque demandé :

    Aspire CLI — Exemple de sortie
    Select an integration to add:
    > rustfs (CommunityToolkit.Aspire.Hosting.RustFs)
    > Other results listed as selectable options...
  2. Add a RustFS resource and, optionally, one or more buckets. See Host RustFS in the AppHost for endpoint, credential, persistence, and bucket configuration.

  3. Reference the RustFS resource or a bucket resource from a consuming project. See Connect to RustFS for connection properties and an S3 client example.