# Aspire.Hosting.Rust

- Module: `Aspire.Hosting.Rust`
- Version: `17.0.0-preview.1.26565.2`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `11`
- Types: `1`

## Handles

- [RustAppResource](/reference/api/go/aspire.hosting.rust/rustappresource.md) -- `handle` - 11 members -- Represents a Rust application resource in the distributed application model.

## Functions

- [AddRustApp](/reference/api/go/aspire.hosting.rust/addrustapp.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Rust application to the application model.
- [WithCargoArgs](/reference/api/go/aspire.hosting.rust/withcargoargs.md) -- `method` - on `RustAppResource` -- Adds command-line arguments to the cargo command used by a Rust application.
- [WithCargoBinTarget](/reference/api/go/aspire.hosting.rust/withcargobintarget.md) -- `method` - on `RustAppResource` -- Configures the binary target to run for Rust applications that declare more than one.
- [WithCargoExample](/reference/api/go/aspire.hosting.rust/withcargoexample.md) -- `method` - on `RustAppResource` -- Configures an example target to run instead of a binary.
- [WithCargoFeatures](/reference/api/go/aspire.hosting.rust/withcargofeatures.md) -- `method` - on `RustAppResource` -- Adds cargo features for the Rust application.
- [WithCargoLocked](/reference/api/go/aspire.hosting.rust/withcargolocked.md) -- `method` - on `RustAppResource` -- Configures the Rust application to build and run with the exact dependency versions recorded in `Cargo.lock`.
- [WithCargoManifestPath](/reference/api/go/aspire.hosting.rust/withcargomanifestpath.md) -- `method` - on `RustAppResource` -- Configures the `Cargo.toml` cargo builds from.
- [WithCargoPackage](/reference/api/go/aspire.hosting.rust/withcargopackage.md) -- `method` - on `RustAppResource` -- Configures the workspace package to build and run.
- [WithCargoProfile](/reference/api/go/aspire.hosting.rust/withcargoprofile.md) -- `method` - on `RustAppResource` -- Configures the named cargo profile to build with.
- [WithCargoReleaseBuild](/reference/api/go/aspire.hosting.rust/withcargoreleasebuild.md) -- `method` - on `RustAppResource` -- Configures the Rust application to run using release optimization.
- [WithCargoTarget](/reference/api/go/aspire.hosting.rust/withcargotarget.md) -- `method` - on `RustAppResource` -- Configures the target triple cargo builds for.
