9

I know I can set rust nightly on a project by running rustup override set nightly. But I was wondering if I could state it on the Cargo.toml, so if I build in another machine it'll just run with nightly from the start. So far I haven't been able to find a way to do it.

trent
  • 21,712
  • 7
  • 47
  • 79

1 Answers1

8

According to the documentation it is not possible to specify it in the Cargo.toml file. But you can create a new file called rust-toolchain.toml containing the following:

[toolchain]
channel = "nightly"

For more options look at the section The toolchain file in the same documentation.

Sören
  • 369
  • 1
  • 5