How do I apply a Nightly Toolchain to the whole Workspace

Hi!
I have a project on Github and my objective is to clone it, do cargo check and return no errors.

The problem is that the project is a workspace with many packages and some of them require the nightly toolchain (because they use the generators feature).

I want a way to build the workspace with the nightly toolchain that doesn't require the person cloning it to change the toolchain manually.

I'm working with people that don't know rust very much and the less they have to configure stuff the better

if this isn't possible then I will just add an instruction to change the default toolchain to nightly.

cargo +nightly build?

As long as everyone is using the cargo installed by rustup, you should be able to use a rust-toolchain.toml file in the workspace

5 Likes

That works really well. The correct toolchain is automatically fetched if it's not installed.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.