Features

Once enabled in an nmk project, the nmk-rust plugin provides the following features.

Check for cargo install

The nmk-rust plugin contributes instructions so that the sys.deps task checks and tells how to install cargo.

VSCode support

If the nmk-vscode plugin is also enabled in the project, following features are provided by nmk-rust.

VSCode extensions

Following extensions are recommended for rust development:

Files generation

As part of the project setup, following files will be generated by nmk-rust.

Cargo configuration file

The cargo configuration file is generated by the rust.config task.

In addition to files and items that can be contributed by the project, nmk-rust generates the following items by default:

Manifest file

The cargo manifest file is generated by the rust.manifest task.

In addition to files and items that can be contributed by the project, nmk-rust generates the following items by default:

Rustfmt configuration file

The rustfmt configuration file is generated by the rust.fmtcfg task.

In addition to files and items that can be contributed by the project, nmk-rust generates the following items by default:

Code format

As part of the project build, nmk-rust will call cargo fmt command to format rust source code (this is handled by the rust.format task).

If all project developers use VSCode IDE, this task shouldn’t do anything since the code is already formatted by the rust-analyzer extension.

However, this allows to make sure that the project code is always correctly formatted. Particularly in CI, if some code is committed without the correct format, this will cause the git.dirty task to fail the build.