Is your feature request related to a problem? Please describe.
The Rust toolchain bins list only takes a crate name and version, like diesel_cli@2.3.9. I can't pass any flags to the install command.
That's a problem for crates like diesel_cli, whose default features pull in postgres, mysql and sqlite. Building it needs all three client libraries installed, even though we only use postgres. The install command we actually want is:
cargo install diesel_cli@2.3.9 --no-default-features --features postgres
There's no way to write that in .moon/toolchain.yml, so we install diesel_cli by hand and it stays outside of moon.
Describe the solution you'd like
Let a bin entry carry extra arguments:
rust:
bins:
- bin: 'diesel_cli@2.3.9'
args: ['--no-default-features', '--features', 'postgres']
moon appends args to the install command. It would also be nice if changing args triggered a reinstall instead of being skipped because the binary already exists.
Describe alternatives you've considered
- Installing it manually or in a separate task. Works, but every dev and CI runner has to remember it, and moon doesn't know about the tool.
- Installing every backend. Means every machine needs libpq, libmysqlclient and libsqlite3 for nothing.
- Relying on prebuilt binaries from cargo-binstall. Those ship with whatever features the author picked, so non-default feature sets aren't possible.
Additional context
Other crates would benefit too, for example sqlx-cli with --no-default-features --features rustls,postgres. Might be worth skipping binstall and going straight to cargo install whenever args is set, since binstall's handling of feature flags isn't consistent.
moon version: 2.5.3
OS: MacOS
Is your feature request related to a problem? Please describe.
The Rust toolchain
binslist only takes a crate name and version, likediesel_cli@2.3.9. I can't pass any flags to the install command.That's a problem for crates like
diesel_cli, whose default features pull in postgres, mysql and sqlite. Building it needs all three client libraries installed, even though we only use postgres. The install command we actually want is:There's no way to write that in
.moon/toolchain.yml, so we install diesel_cli by hand and it stays outside of moon.Describe the solution you'd like
Let a bin entry carry extra arguments:
moon appends
argsto the install command. It would also be nice if changingargstriggered a reinstall instead of being skipped because the binary already exists.Describe alternatives you've considered
Additional context
Other crates would benefit too, for example
sqlx-cliwith--no-default-features --features rustls,postgres. Might be worth skipping binstall and going straight tocargo installwheneverargsis set, since binstall's handling of feature flags isn't consistent.moon version: 2.5.3
OS: MacOS