是否可以指定 Cargo 项目需要最低 rustc 版本,例如 1.1.0 才能编译?
最佳答案
在 Rust 1.56.0 中你可以使用 rust-version
:
The rust-version field is an optional key that tells cargo what version of the Rust language and compiler your package can be compiled with. If the currently selected version of the Rust compiler is older than the stated version, cargo will exit with an error, telling the user what version is required.
[package]
rust-version = "1.56"
关于rust - 指定 Cargo 项目所需的 rustc 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32821998/