Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

RustAppResource

Handle
📦 Aspire.Hosting.Rust v17.0.0-preview.1.26565.2

Represents a Rust application resource in the distributed application model.

type RustAppResource interface {
IComputeResource
IContainerFilesDestinationResource
Resource
ResourceWithArgs
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)

Methods

methodWithCargoArgsbuilder
Adds command-line arguments to the cargo command used by a Rust application.
WithCargoArgs(args []string) RustAppResource
args[]stringThe cargo arguments to append before --.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoBinTargetbuilder
Configures the binary target to run for Rust applications that declare more than one.
WithCargoBinTarget(binName string) RustAppResource
binNamestringThe binary target name, as declared by [[bin]] name in Cargo.toml.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoExamplebuilder
Configures an example target to run instead of a binary.
WithCargoExample(exampleName string) RustAppResource
exampleNamestringThe example name, as declared by a file or directory under examples/.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoFeaturesbuilder
Adds cargo features for the Rust application.
WithCargoFeatures(features []string) RustAppResource
features[]stringThe features to enable.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoLockedbuilder
Configures the Rust application to build and run with the exact dependency versions recorded in Cargo.lock.
WithCargoLocked(options ...*WithCargoLockedOptions) RustAppResource
options...*WithCargoLockedOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithCargoLockedOptions argument.

Locked*booltrue to add --locked; otherwise false.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Configures the Cargo.toml cargo builds from.
WithCargoManifestPath(manifestPath string) RustAppResource
manifestPathstringThe path to the manifest, absolute or relative to the app directory.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoPackagebuilder
Configures the workspace package to build and run.
WithCargoPackage(packageName string) RustAppResource
packageNamestringThe cargo package name.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoProfilebuilder
Configures the named cargo profile to build with.
WithCargoProfile(profileName string) RustAppResource
profileNamestringThe profile name, for example dev, release, or a custom profile.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Configures the Rust application to run using release optimization.
WithCargoReleaseBuild(options ...*WithCargoReleaseBuildOptions) RustAppResource
options...*WithCargoReleaseBuildOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithCargoReleaseBuildOptions argument.

ReleaseBuild*booltrue to add --release; otherwise false.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithCargoTargetbuilder
Configures the target triple cargo builds for.
WithCargoTarget(target string) RustAppResource
targetstringThe target triple, for example x86_64-unknown-linux-musl.
RustAppResource

The resource builder.

Returns a handle; failures surface later via Err().