Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
83ee1af
feat: add RustFs
konnta0 Apr 27, 2026
52dd0e6
fix: remove unused using in RustFsFunctionalTests
konnta0 Apr 30, 2026
0a3e341
fix: use $(RepoRoot) for shared file include in test csproj
konnta0 Apr 30, 2026
dc502a6
fix: use string interpolation for WithEnvironment, sanitize bucket re…
konnta0 Apr 30, 2026
764aeaa
test: add unit tests for AddBucket
konnta0 Apr 30, 2026
ddadf04
Merge branch 'main' into feature/rustfs
konnta0 May 13, 2026
d77bec7
Merge branch 'main' into feature/rustfs
aaronpowell May 25, 2026
193d75c
Update examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost…
aaronpowell May 25, 2026
6adf3ae
fix: remove SDK properties already set in Directory.Build.props
konnta0 May 26, 2026
ed181bc
feat: add RustFsBucketResource and replace minio/mc with inline HTTP …
konnta0 May 26, 2026
c5a29b4
Merge branch 'main' into feature/rustfs
konnta0 May 26, 2026
e1af595
fix: set world-writable permissions on bind mount temp dir for Linux
konnta0 May 28, 2026
11437ac
Merge branch 'main' into feature/rustfs
konnta0 May 28, 2026
4dbfae0
Merge branch 'main' into feature/rustfs
konnta0 Jun 4, 2026
b3e8c03
Merge branch 'main' into feature/rustfs
konnta0 Jun 14, 2026
08faca3
fix: align RustFs example AppHost and extension methods with Aspire 1…
konnta0 Jun 15, 2026
11b76d2
chore: bump RustFs container image from 1.0.0-alpha.82 to 1.0.0-beta.8
konnta0 Jun 15, 2026
19fe55d
Merge branch 'main' into feature/rustfs
konnta0 Jun 15, 2026
9f18ed0
Update examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost…
aaronpowell Jun 17, 2026
40d1915
Update src/CommunityToolkit.Aspire.Hosting.RustFs/CommunityToolkit.As…
aaronpowell Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CommunityToolkit.Aspire.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
<Project Path="examples/rust/CommunityToolkit.Aspire.Hosting.Rust.AppHost/CommunityToolkit.Aspire.Hosting.Rust.AppHost.csproj" />
<Project Path="examples/rust/CommunityToolkit.Aspire.Hosting.Rust.ServiceDefaults/CommunityToolkit.Aspire.Hosting.Rust.ServiceDefaults.csproj" />
</Folder>
<Folder Name="/examples/rustfs/">
<Project Path="examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.csproj" />
</Folder>
<Folder Name="/examples/sftp/">
<Project Path="examples/sftp/CommunityToolkit.Aspire.Hosting.Sftp.ApiService/CommunityToolkit.Aspire.Hosting.Sftp.ApiService.csproj" />
<Project Path="examples/sftp/CommunityToolkit.Aspire.Hosting.Sftp.AppHost/CommunityToolkit.Aspire.Hosting.Sftp.AppHost.csproj" />
Expand Down Expand Up @@ -236,6 +239,7 @@
<Project Path="src/CommunityToolkit.Aspire.Hosting.RavenDB/CommunityToolkit.Aspire.Hosting.RavenDB.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Redis.Extensions/CommunityToolkit.Aspire.Hosting.Redis.Extensions.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Rust/CommunityToolkit.Aspire.Hosting.Rust.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.RustFs/CommunityToolkit.Aspire.Hosting.RustFs.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Sftp/CommunityToolkit.Aspire.Hosting.Sftp.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.Solr/CommunityToolkit.Aspire.Hosting.Solr.csproj" />
<Project Path="src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.csproj" />
Expand Down Expand Up @@ -299,6 +303,7 @@
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests/CommunityToolkit.Aspire.Hosting.Redis.Extensions.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Rust.Tests/CommunityToolkit.Aspire.Hosting.Rust.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.RustFs.Tests/CommunityToolkit.Aspire.Hosting.RustFs.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Sftp.Tests/CommunityToolkit.Aspire.Hosting.Sftp.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.Solr.Tests/CommunityToolkit.Aspire.Hosting.Solr.Tests.csproj" />
<Project Path="tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.csproj" />
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ This repository contains the source code for the Aspire Community Toolkit, a col
| - **Learn More**: [`Hosting.MySql.Extensions`][mysql-ext-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.MySql.Extensions][mysql-ext-shields]][mysql-ext-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.MySql.Extensions][mysql-ext-shields-preview]][mysql-ext-nuget-preview] | An integration that contains some additional extensions for hosting MySql container. |
| - **Learn More**: [`Hosting.MinIO`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields]][minio-hosting-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields-preview]][minio-hosting-nuget-preview] | An Aspire hosting integration to setup a [MinIO S3](https://min.io/) storage. |
| - **Learn More**: [`MinIO.Client`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Minio.Client][minio-client-shields]][minio-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Client.Minio][minio-client-shields-preview]][minio-client-nuget-preview] | An Aspire client integration for the [MinIO](https://github.com/minio/minio-dotnet) package. |
| - **Learn More**: [`Hosting.RustFs`][rustfs-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.RustFs][rustfs-hosting-shields]][rustfs-hosting-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.RustFs][rustfs-hosting-shields-preview]][rustfs-hosting-nuget-preview] | An Aspire hosting integration to setup a [RustFs](https://github.com/rustfs/rustfs) S3-compatible storage. |
| - **Learn More**: [`Hosting.SurrealDb`][surrealdb-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.SurrealDb][surrealdb-shields]][surrealdb-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.SurrealDb][surrealdb-shields-preview]][surrealdb-nuget-preview] | An Aspire hosting integration leveraging the [SurrealDB](https://surrealdb.com/) container. |
| - **Learn More**: [`SurrealDb`][surrealdb-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.SurrealDb][surrealdb-client-shields]][surrealdb-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.SurrealDb][surrealdb-client-shields-preview]][surrealdb-client-nuget-preview] | An Aspire client integration for the [SurrealDB](https://github.com/surrealdb/surrealdb.net/) package. |
| - **Learn More**: [`Hosting.Elasticsearch.Extensions`][elasticsearch-ext-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions][elasticsearch-ext-shields]][elasticsearch-ext-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions][elasticsearch-ext-shields-preview]][elasticsearch-ext-nuget-preview] | An integration that contains some additional extensions for hosting Elasticsearch container. |
Expand Down Expand Up @@ -274,6 +275,11 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)
[minio-client-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Minio.Client/
[minio-client-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Minio.Client?label=nuget%20(preview)
[minio-client-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Minio.Client/absoluteLatest
[rustfs-integration-docs]: https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-rustfs
[rustfs-hosting-shields]: https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.RustFs
[rustfs-hosting-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RustFs/
[rustfs-hosting-shields-preview]: https://img.shields.io/nuget/vpre/CommunityToolkit.Aspire.Hosting.RustFs?label=nuget%20(preview)
[rustfs-hosting-nuget-preview]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.RustFs/absoluteLatest
[surrealdb-integration-docs]: https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-surrealdb
[surrealdb-shields]: https://img.shields.io/nuget/v/CommunityToolkit.Aspire.Hosting.SurrealDb
[surrealdb-nuget]: https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.SurrealDb/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Aspire.AppHost.Sdk/13.4.0">
Comment thread
aaronpowell marked this conversation as resolved.
Outdated

<PropertyGroup>
<OutputType>Exe</OutputType>
<UserSecretsId>d1a3e2c4-5b6f-7890-abcd-ef1234567890</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\CommunityToolkit.Aspire.Hosting.RustFs\CommunityToolkit.Aspire.Hosting.RustFs.csproj" IsAspireProjectResource="false" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var builder = DistributedApplication.CreateBuilder(args);

var accessKey = builder.AddParameter("accessKey", "rustfsadmin");
var secretKey = builder.AddParameter("secretKey", "rustfsadmin", secret: true);

var rustfs = builder.AddRustFs("rustfs", accessKey, secretKey)
.WithDataVolume()
.AddBucket("mybucket");

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:18130;http://localhost:12048",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:32486",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:12810"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15183",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19197",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:21262"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AdditionalPackageTags>hosting rustfs storage s3-compatible</AdditionalPackageTags>
<Description>An Aspire hosting integration for RustFs</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting" />
</ItemGroup>
Comment thread
aaronpowell marked this conversation as resolved.

</Project>
42 changes: 42 additions & 0 deletions src/CommunityToolkit.Aspire.Hosting.RustFs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# CommunityToolkit.Aspire.Hosting.RustFs library

Provides extension methods and resource definitions for the Aspire AppHost to support running [RustFs](https://github.com/rustfs/rustfs) containers.

## Getting Started

### Install the package

In your AppHost project, install the package using the following command:

```dotnetcli
dotnet add package CommunityToolkit.Aspire.Hosting.RustFs
```

### Example usage

Then, in the _Program.cs_ file of `AppHost`, add a RustFs resource and consume the connection using the following methods:

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var rustfs = builder.AddRustFs("rustfs")
.WithDataVolume()
.AddBucket("mybucket");

builder.Build().Run();
```

### Buckets

`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>)`:

```csharp
builder.AddRustFs("rustfs")
.AddBucket(["images", "documents", "audit-log"]);
```

52 changes: 52 additions & 0 deletions src/CommunityToolkit.Aspire.Hosting.RustFs/RustFsBucketResource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents an S3 bucket created on a RustFs container resource.
/// </summary>
public sealed class RustFsBucketResource : Resource, IResourceWithParent<RustFsResource>, IResourceWithConnectionString
{
/// <summary>
/// Gets the parent <see cref="RustFsResource"/> that hosts this bucket.
/// </summary>
public RustFsResource Parent { get; }

/// <summary>
/// Gets the S3 bucket name as it exists on the RustFs server.
/// </summary>
/// <remarks>
/// This is the actual name used on the wire; it may differ from <see cref="Resource.Name"/>,
/// which is the Aspire resource identifier.
/// </remarks>
public string BucketName { get; }

/// <summary>
/// Initializes a new instance of the <see cref="RustFsBucketResource"/> class.
/// </summary>
/// <param name="name">The Aspire resource name.</param>
/// <param name="bucketName">The S3 bucket name on RustFs.</param>
/// <param name="parent">The parent RustFs resource.</param>
public RustFsBucketResource([ResourceName] string name, string bucketName, RustFsResource parent)
: base(name)
{
ArgumentException.ThrowIfNullOrWhiteSpace(bucketName);
ArgumentNullException.ThrowIfNull(parent);

BucketName = bucketName;
Parent = parent;
}

/// <summary>
/// Gets the connection string expression for the bucket.
/// </summary>
/// <remarks>
/// Format: <c>Endpoint=http://host:port;AccessKey=key;SecretKey=secret;Bucket=bucket</c>.
/// </remarks>
public ReferenceExpression ConnectionStringExpression =>
ReferenceExpression.Create($"{Parent};Bucket={BucketName}");

/// <inheritdoc/>
IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Bucket", ReferenceExpression.Create($"{BucketName}"))
]);
}
Loading
Loading