Currently, rust-toolchain.toml, allows specification of the development channel, target platform, and associated tooling (compiler, packager), etc. Unfortunately, the components
key which accepts additional tools does not accommodate the stipulation of cargo-watch
and trunk
(a cargo alternative for WASM crates). As a newbie, their rejection seems strange. Their exclusion limits the amazing utility of rust-toolchain.toml
to automate the tooling of a development environment.
The question is, am I missing something? Is there a way to integrate these tools into rust-toolchain.toml
, is there some other way for them be a specified (apart from a shell script), or are they redundant?
Presently I manually install them: cargo install watch trunk
. Yes, this is easy and simple but also undocumented, forgettable, and clumsy.
I must say, rust
and its tooling is impressive.
As far as I know, the components
key is specifically for toolchain internal components. These components are also toolchain specific, e.g. a rustup +stable component add rust-src
is different from a rustup +nightly component add rust-src
.
On the other hand, crates from crates.io (which is what cargo install
can install) are essentially toolchain independent. So it makes sense to me that crates in general can not be specified by rust-toolchain.toml
file, which is more about pinning the toolchain to a specific version.
However, about cargo plugins specifically, maybe you find a compelling way to propose this as new feature to cargo (e.g. allow specifying cargo plugins in config.toml
).