23.13 Extending Cargo with Custom Commands
You can create custom Cargo subcommands by distributing a binary named cargo-something
. Once installed, running cargo something
invokes your tool.
This approach is useful for specialized workflows such as code generation. However, remember that such tools have the same privileges as your local Cargo environment, so only install them from trusted sources.