CargoRunner
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| TaskRunner anyenv.task_runners._base Base class for task runner configurations. |
â‹” Inheritance diagram¶
graph TD
3700369045["_cargo.CargoRunner"]
3225203877["_base.TaskRunner"]
2751680898["builtins.object"]
3225203877 --> 3700369045
2751680898 --> 3225203877
🛈 DocStrings¶
Bases: TaskRunner
Task runner for Cargo (Rust) aliases and xtask.
Supports:
- Aliases defined in .cargo/config.toml or .cargo/config
- xtask convention (workspace with xtask crate)
Source code in src/anyenv/task_runners/_cargo.py
detect
async
¶
Check if this task runner is used in the given directory.
Source code in src/anyenv/task_runners/_cargo.py
get_config_file
async
¶
Get the cargo config file path if it exists.
Source code in src/anyenv/task_runners/_cargo.py
get_run_command
¶
Get the cargo command for a specific task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_name
|
str
|
Name of the task (alias or xtask:command) |
required |
*args
|
str
|
Additional arguments |
()
|
Source code in src/anyenv/task_runners/_cargo.py
get_tasks
async
¶
get_tasks(fs: AsyncFileSystem, cwd: str) -> list[TaskInfo]
Parse cargo config and xtask to return available tasks.