Tasks

The nmk-rust plugin defines the tasks described below.

Setup tasks

All tasks in this chapter are dependencies of the base setup task.

rust.config – Cargo config file generation

This task generates the ${rustConfigFile} cargo configuration file.

Property

Value/description

builder

nmk_base.common.TomlFileBuilder

input

${rustConfigFileFragments} files

output

${rustConfigFile} file

if

${rustSrcFiles} are found

The builder is called with the following parameters mapping:

Name

Value

fragment_files

${rustConfigFileFragments}

items

${rustConfigFileItems}

plugin_name

“nmk-rust”

rust.manifest – Cargo manifest file generation

This task generates the ${rustManifestFile} cargo package manifest file.

Property

Value/description

builder

nmk_base.common.TomlFileBuilder

input

${rustManifestFileFragments} files

output

${rustManifestFile} file

if

${rustSrcFiles} are found

The builder is called with the following parameters mapping:

Name

Value

fragment_files

${rustManifestFileFragments}

items

${rustManifestFileItems}

plugin_name

“nmk-rust”

rust.fmtcfg – rustfmt config file generation

This task generates the ${rustFormatFile} rustfmt configuration file.

Property

Value/description

builder

nmk_base.common.TomlFileBuilder

input

${rustFormatFileFragments} files

output

${rustFormatFile} file

if

${rustSrcFiles} are found

The builder is called with the following parameters mapping:

Name

Value

fragment_files

${rustFormatFileFragments}

items

${rustFormatFileItems}

plugin_name

“nmk-rust”

Build tasks

All tasks in this chapter are dependencies of the base build task.

rust.format – Format rust code files

This task calls the cargo fmt command (alias to rustfmt tool) to format rust code files.

Property

Value/description

builder

nmk_base.common.ProcessBuilder

input

${rustSrcFiles} files

output

${rustFormatStampFile} file

if

${rustSrcFiles} are found

The builder is called with the following parameters mapping:

Name

Value

cmd

[“cargo”, “fmt”, ${rustFormatExtraArgs}]