# RustAppResource.withCargoArgs

- Module: [Aspire.Hosting.Rust](/reference/api/typescript/aspire.hosting.rust.md)
- Defined on: [RustAppResource](/reference/api/typescript/aspire.hosting.rust/rustappresource.md)
- Version: `13.6.0-preview.1.26478.8`
- Kind: `method`

Adds command-line arguments to the cargo command used by a Rust application.

## Definition

```typescript
interface RustAppResource {
  // ... omitted for brevity
  withCargoArgs(args: string[]): RustAppResource;
}
```

## Signature

```typescript
withCargoArgs(args: string[]): RustAppResource
```

## Parameters

- `args` (`string[]`)

## Returns

[RustAppResource](/reference/api/typescript/aspire.hosting.rust/rustappresource.md) `builder`

## Defined on

- [RustAppResource](/reference/api/typescript/aspire.hosting.rust/rustappresource.md) -- `handle`
