DeterminateSystems / riff

Riff automatically provides external dependencies for Rust projects, with support for other languages coming soon.
https://riff.sh
Mozilla Public License 2.0
486 stars 13 forks source link

Feature Request: Rust projects could read Rustup rust-toolchain files to inform the calculated devShell #147

Open shanesveller opened 2 years ago

shanesveller commented 2 years ago

Upstream reference: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file

There's two forms I've seen in the wild, a simple string like stable or 1.64.0 or a TOML file that could optionally indicate what compilation target or components were required, as well as what version. Per upstream the former is considered legacy/deprecated.

From my POV, this would both:

Known complications:

I myself am not a nightly user but I imagine this support would be attractive to such projects as well.

shanesveller commented 2 years ago

Alternatives considered:

cole-h commented 1 year ago

I think this should be partially fixed by https://github.com/DeterminateSystems/riff/pull/171. I say "partially", because we still rely on the user having installed Rust via rustup (or having rustup installed). However, this way we don't need to deal with parsing and using the potentially-complex rust-toolchain.toml file ourselves -- rustup handles that.

Please take a look at that PR and let me know what you think! (There are instructions for how to use it in the PR body, since it's not immediately obvious.)