From 020b64a9efb45f108b9d35f95f47a32eb49c63e9 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 22 Feb 2022 15:55:09 +0000 Subject: [PATCH] build: introduce rust-version in Cargo.toml Starting from Rust 1.56 Cargo supports specifying the minimum supported rust version (MSRV) via "rust-version". If the compiler version is not satisfied, Cargo prints an error and exits early. MSRV is useful information to packagers. Using this field also saves us from adding another file to the tree. The version is currently set to 1.54, which is tested to build Cloud Hypervisor successfully. Although anyone who uses 1.54 will see a warning because "rust-version" is only introduced in 1.56. The warning can be safely ignored. Signed-off-by: Wei Liu --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 6e91c9d1e..5aa75ead6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ build = "build.rs" license = "LICENSE-APACHE & LICENSE-BSD-3-Clause" description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM" homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor" +rust-version = "1.54" [profile.release] lto = true