mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-13 04:57:43 +02:00
Add build.rs which is used to check the Rust version before building.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
extern crate rustc_version;
|
||||
use rustc_version::{Version, version};
|
||||
|
||||
fn main() {
|
||||
let version = version().expect("Failed to get rustc version.");
|
||||
if version < Version::parse("1.42.0").unwrap() {
|
||||
eprintln!(
|
||||
"\n\nAt least Rust version 1.42 is required.\n\
|
||||
Version {} is used for building.\n\
|
||||
Build aborted.\n\n",
|
||||
version);
|
||||
panic!();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user