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 |
|
input |
|
output |
${rustConfigFile} file |
if |
${rustSrcFiles} are found |
The builder is called with the following parameters mapping:
Name |
Value |
|---|---|
fragment_files |
|
items |
|
plugin_name |
“nmk-rust” |
rust.manifest – Cargo manifest file generation
This task generates the ${rustManifestFile} cargo package manifest file.
Property |
Value/description |
|---|---|
builder |
|
input |
|
output |
${rustManifestFile} file |
if |
${rustSrcFiles} are found |
The builder is called with the following parameters mapping:
Name |
Value |
|---|---|
fragment_files |
|
items |
|
plugin_name |
“nmk-rust” |
rust.fmtcfg – rustfmt config file generation
This task generates the ${rustFormatFile} rustfmt configuration file.
Property |
Value/description |
|---|---|
builder |
|
input |
|
output |
${rustFormatFile} file |
if |
${rustSrcFiles} are found |
The builder is called with the following parameters mapping:
Name |
Value |
|---|---|
fragment_files |
|
items |
|
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 |
|
input |
${rustSrcFiles} files |
output |
|
if |
${rustSrcFiles} are found |
The builder is called with the following parameters mapping:
Name |
Value |
|---|---|
cmd |
[“cargo”, “fmt”, ${rustFormatExtraArgs}] |