Skip to main content
net10.0net8.0net9.0

An Aspire integration for hosting Bun apps. DEPRECATED: Use Aspire.Hosting.JavaScript and builder.AddBunApp(...) instead. This package will be removed in a future release.

Published
Aug 25, 2026
1mo ago
Total Downloads
112.7K
112,693

Deprecated Package Version

Reason: Legacy

As of Aspire 13.5.0, Bun hosting is built into the Aspire.Hosting.JavaScript integration

Install

dotnet add package CommunityToolkit.Aspire.Hosting.Bun --version 13.5.0
ProductVersions
.NET
net10.0net8.0net9.0

README

CommunityToolkit.Aspire.Hosting.Bun library

āš ļø DEPRECATION NOTICE
This package is deprecated. Bun support is now available in the core Aspire.Hosting.JavaScript package via AddBunApp(...).

Migration Guide:

  • Install Aspire.Hosting.JavaScript and remove CommunityToolkit.Aspire.Hosting.Bun.
  • Review existing builder.AddBunApp(...) calls carefully: if you pass arguments positionally, you may need to reorder them or convert them to named arguments when moving to the core package implementation.
  • If you're using TypeScript AppHost bindings, continue using builder.addBunApp(...) from the generated core bindings.

This package will be removed in a future release. Please migrate to Aspire.Hosting.JavaScript.

Provides extension methods and resource definitions for an Aspire AppHost to configure a Bun project.

Getting Started

Install the package

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

dotnet add package CommunityToolkit.Aspire.Hosting.Bun

Example usage

Then, in the Program.cs file of AppHost, define a Bun resource, then call AddBunApp:

builder.AddBunApp("bun-server", "main.ts")
    .WithHttpEndpoint(env: "PORT")
    .WithEndpoint();

Migration from Toolkit Bun to core Bun

Toolkit API:

builder.AddBunApp("api", "server.ts")
    .WithHttpEndpoint(env: "PORT");

Core API (Aspire.Hosting.JavaScript):

builder.AddBunApp("api", "./api", "server.ts")
    .WithHttpEndpoint(env: "PORT")
    .WithExternalHttpEndpoints();

TypeScript AppHost (core bindings):

await builder
    .addBunApp("api", "./api", "server.ts")
    .withHttpEndpoint({ env: "PORT" })
    .withExternalHttpEndpoints();

Additional Information

https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-bun

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Changes from Previous Version

v13.5.0-beta.731v13.5.0
Deprecated
This version was marked as deprecated.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

NuGet marks this package as deprecated and points to Aspire.Hosting.JavaScript as an alternative.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.