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.
Output Options Defaults to target in the root of the workspace. Copy final artifacts to this directory. This option is unstable and available only on the nightly channel and requires the -Z unstable-options flag to enable.
cargo run will again compile the code if it notices any change after cargo build command is executed. It also says that cargo build --release command creates the final program, which will run faster.
When no target selection options are given, cargo check will check all binary and library targets of the selected packages. Binaries are skipped if they have required-features that are missing. Passing target selection flags will check only the specified targets.
A new feature is added to Rust: a new commit lands on the master branch. Each night, a new nightly version of Rust is produced. Every day is a release day, and these releases are created by our release infrastructure automatically. So as time passes, our releases look like this, once a night: nightly: * - - * - - *
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With