Skip to content
DocsTry Aspire
DocsTry

RustAppHostingExtension Methods

ClassMethods2 members
Provides extension methods for adding Rust applications to an Hosting.IDistributedApplicationBuilder.
AddBaconApp(IDistributedApplicationBuilder, string, string, string[]?)Section titled AddBaconApp(IDistributedApplicationBuilder, string, string, string[]?)extensionIResourceBuilder<RustAppExecutableResource>
Adds a Rust application to the application model, using the bacon cli.
public static class RustAppHostingExtension
{
public static IResourceBuilder<RustAppExecutableResource> AddBaconApp(
this IDistributedApplicationBuilder builder,
string name,
string workingDirectory,
string[]? args = null)
{
// ...
}
}
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to add the resource to.
namestringThe name of the resource.
workingDirectorystringThe working directory to use for the command.
argsstring[]?optionalThe optional arguments to be passed to the bacon command.
IResourceBuilder<RustAppExecutableResource>A reference to the ApplicationModel.IResourceBuilder`1.
AddRustApp(IDistributedApplicationBuilder, string, string, string[]?)Section titled AddRustApp(IDistributedApplicationBuilder, string, string, string[]?)extensionIResourceBuilder<RustAppExecutableResource>
Adds a Rust application to the application model, using the cargo cli.
public static class RustAppHostingExtension
{
public static IResourceBuilder<RustAppExecutableResource> AddRustApp(
this IDistributedApplicationBuilder builder,
string name,
string workingDirectory,
string[]? args = null)
{
// ...
}
}
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to add the resource to.
namestringThe name of the resource.
workingDirectorystringThe working directory to use for the command.
argsstring[]?optionalThe optional arguments to be passed to the executable when it is started.
IResourceBuilder<RustAppExecutableResource>A reference to the ApplicationModel.IResourceBuilder`1.