oxipng/build.rs
2021-07-11 23:54:29 -04:00

11 lines
365 B
Rust

use rustc_version::{version, Version};
use std::process::exit;
fn main() {
// This should match the version in Github Actions scripts and the Readme
const REQUIRED_VERSION: &str = "1.46.0";
if version().unwrap() < Version::parse(REQUIRED_VERSION).unwrap() {
eprintln!("oxipng requires rustc >= {}.", REQUIRED_VERSION);
exit(1);
}
}