Releases: nxrs/cargo
Release 0.4.0
Ignore Nx configuration's targets
key
Nx targets are configured in a project's configuration file like this:
{
...
"targets": {
"<target-name>": {
"executor": "<executor-name>",
...
}
...
}
}
Previously, this plugin had been using that <target-name> to determine which type of command to execute. However, users should be permitted to assign whatever string they'd like to those keys without affecting the behavior of the invoked executor. This release reworks the parseArgs
function to take a separate parameter for the cargo
command to execute, which we determine solely by which of the plugin's executors was invoked.
Add a dedicated run
executor
Inline with the above changes, a new @nxrs/cargo:run
executor has been added to handle cargo run ...
commands. This executor was actually the main motivator for the changes above — if the Nx config's target key is run
, users can no longer use the shorthand form for invoking that target (i.e., nx <target> <project>
instead of nx run <project>:<target>
), because it collides with the built-in nx run
command.
With these changes, the run
executor can be configured like so:
{
...
"targets": {
"dev": {
"executor": "@nxrs/cargo:run",
...
}
...
}
}
And users can invoke that target by running nx dev <project>
.
The default output from this plugin's bin
generator also now outputs the configuration above instead of using run
as the target key, but users are welcome to change that key to whatever they'd like.
Additional changes to executor processing
- Support has been added for the
bin
argument, so you can specify a particular binary target when runningbuild
,run
, etc. - The
parseArgs
function will now pass any unknown options it receives directly through tocargo
, after prefixing them with--
and converting them to kebab-case. This should help with future-proofing this plugin in the absence of specific updates to support additional arguments supported bycargo
in the future.
Release 0.3.4
- Generators no longer enforce
snake_case
for generated projects - A
run
target is now added to generated Binary projects (thanks, @alekangelov!) - A
build
target is now added to generated Library projects (thanks, @cdmistman!) - Large projects should no longer encounter errors due to oversized
node:child_process
buffers (thanks, @Equilibris!)
Release 0.3.3
- Added support for
target
option
Release 0.3.2
- Upgraded to Nx 13
- Fixed app and lib generators failing when there isn't already a project in the workspace
Release 0.3.1
- Updated nx from 12.5.8 -> 12.7.2
- Fixed graph processor
Release 0.3.0
Changes
- Added project graph processor plugin to tell nx how to resolve Rust project dependencies
- Removed
build
target from library generation to avoid an issue with nx running targets unnecessarily - Fixed an issue where incorrect arguments were passed to
cargo
for library build targets
Release 0.2.0
Changes
- Fixed an issue causing the
--dry-run
generator flag to not be respected - Added
--edition
option for generators - Updated generators to add an empty
options
object and a defaultproduction
configuration to the workspace entries they create
Release 0.1.2
Fixes issues with toolchain
and outDir
executor options
Release 0.1.1
Initial release