我正在尝试运行 Rocket但我在第一个障碍就倒下了。尝试 cargo run
时,出现以下错误:
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).
我是 Rust 的新手,但来自其他语言,这毫无意义。它至少需要 1.31.0 版,但我安装了 1.33.0 版。
我做错了什么?
最佳答案
如果软件需要每晚构建 Rust,则没有稳定版本的 Rust 可以替代:您需要每晚使用。
Rust 的夜间 channel 是稳定版 Rust 的超集。尚未完成或尚未证明其值(value)的功能包含在 Rust 的夜间构建中。您通过 crate attribute 选择使用给定的功能.
这些不稳定的功能可能会随时完全更改甚至被删除。换句话说,不稳定的特性从不保证存在于任何特定的 Rust 稳定版本中。
如果有帮助,您可以将夜间版本视为开发的“替代现实”轨道。 nightly 的版本号只是它们存在时间的一个松散指示器;编译日期和 git commit hash 提供了更多信息。
I would have thought the nightly code from 1.31.0 would be pushed into the stable 1.31.0+ versions once tested
这就是 beta channel 的工作方式——1.x.y-beta 中的任何内容都将在 1.x.y-stable 中(假设没有发生重大紧急情况)。
另见:
关于rust - Rocket 每晚需要最低版本的 Rust,但已经安装了更高的稳定版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55230896/