I'm trying to run Rocket but I'm falling at the first hurdle. When trying to cargo run
, I get the following error:
error: failed to run custom build command for `pear_codegen v0.1.2`
Error: Pear requires a nightly or dev version of Rust.
Installed version is: 1.33.0 (2019-02-28). Minimum required: 1.31.0-nightly (2018-10-05).
I'm new to Rust, but coming from other languages this makes no sense whatsoever. It needs version 1.31.0 as a minimum but I have version 1.33.0 installed.
What am I doing wrong?
Installing Rust# Warning: Rocket requires the latest version of Rust nightly.
To sum up: use stable to do normal work; use nightly to experiment with unstable features; use beta to test the next Rust version and get ahead of possible future problems. It is worth saying that the nightly channel is pretty stable and some teams use it in production (after pinning of course).
Nightly availabilityUse the rustup-components-history project to find the build status of recent nightly toolchains and components. When you attempt to install or update the nightly channel, rustup will check if a required or previously installed component is missing.
If software requires a nightly build of Rust, no stable version of Rust can be substituted: you are required to use nightly.
The nightly channel of Rust is a superset of stable Rust. Features that are not yet complete or simply haven't proven their value are included in nightly builds of Rust. You opt into using a given feature via a crate attribute.
These unstable features may completely change or even be removed at any time. Said another way, an unstable feature is never guaranteed to exist in any particular Rust stable version.
If it helps, you can think of nightly versions as an "alternate reality" track of development. The version number of nightly is only a loose indicator of where they exist in time; the compilation date and git commit hash are much more informative.
I would have thought the nightly code from 1.31.0 would be pushed into the stable 1.31.0+ versions once tested
This is how the beta channel works — anything in 1.x.y-beta will be in 1.x.y-stable (assuming no major emergency occurs).
See also:
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