JetBrains Fleet 1.48 Help

Rust run configurations

To run a program, you can use run configurations. It allows you to customize the startup: add command line arguments, use custom commands, and so on.

To create a run configuration, you need to create run.json.

Examples of run configurations

The following code snippet shows examples of different run configurations. See the descriptions of the fields in the Cargo section.

{ "configurations": [ { "type": "cargo", "name": "app_name_run", "cargoArgs": ["run"], "executableArgs": ["1","2","3"], }, { "type": "cargo", "name": "app_name_build", "cargoArgs": ["build"], }, { "type": "cargo", "name": "app_name_check", "cargoArgs": ["check"], }, { "type": "cargo", "name": "app_name_test", "cargoArgs": ["test"], "executableArgs": ["1","2","3"], }, ] }

cargo

Runs cargo via `cargo $cargoArgs $cargoExtraArgs -- $executableArgs`

environment

Custom environment variables for the process, specified as a JSON object. To define an environment variable, add a property where the key is the variable name and the value is its value. For example:

"environment": { "TEMP_DIR": "/home/user/temp", "GENERATE_RANDOM_PASSWORD": "true" }

dependsOn

Names of other configurations to run before this configuration. For example: "dependsOn": ["first", "second"]. For details, see Chained run configurations.

workingDir

Working directory for the run configuration.

allowParallelRun

If set to true, multiple instances of this configuration can run simultaneously.

cargoArgs

Arguments to be passed to cargo

Default value: []

cargoExtraArgs

Extra arguments to be passed to cargo

Default value: []

executableArgs

Arguments to the program executed by cargo. These arguments go after '--' in the cargo command.

Default value: []

Example:

{ "configurations": [ { "type": "cargo", "name": "app_name_run", "cargoArgs": ["run"], "executableArgs": ["1","2","3"] }, { "type": "cargo", "name": "app_name_build", "cargoArgs": ["build"] }, { "type": "cargo", "name": "app_name_check", "cargoArgs": ["check"] }, { "type": "cargo", "name": "app_name_test", "cargoArgs": ["test"], "executableArgs": ["1","2","3"] } ] }
22 May 2025