craft_parts.plugins.cargo_use_plugin module

The cargo-use plugin.

This plugin copy the content of the Rust repository to the local crates registry.

class craft_parts.plugins.cargo_use_plugin.CargoUsePlugin(*, properties, part_info)[source]

Bases: Plugin

Copy the content of the Rust repository and .

Parameters:
get_build_commands()[source]

Return a list of commands to run during the build step.

Return type:

list[str]

get_build_environment()[source]

Return a dictionary with the environment to use in the build step.

Return type:

dict[str, str]

get_build_packages()[source]

Return a set of required packages to install in the build environment.

Return type:

set[str]

get_build_snaps()[source]

Return a set of required snaps to install in the build environment.

Return type:

set[str]

get_pull_commands()[source]

Return a list commands to retrieve dependencies during the pull step.

Return type:

list[str]

properties_class

alias of CargoUsePluginProperties

class craft_parts.plugins.cargo_use_plugin.CargoUsePluginProperties(**data)[source]

Bases: PluginProperties

The part properties used by the cargo-use plugin.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin: Literal['cargo-use']
source: str