add a features for gating things we can use once 1.80 is msrv
This commit is contained in:
@@ -23,6 +23,7 @@ hostname = ["dep:hostname"]
|
|||||||
tls = ["dep:native-tls"]
|
tls = ["dep:native-tls"]
|
||||||
http = ["dep:warp", "dep:reqwest"]
|
http = ["dep:warp", "dep:reqwest"]
|
||||||
crypto-full = []
|
crypto-full = []
|
||||||
|
"rust-version-1.80" = []
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
indexmap = "1.0.2"
|
indexmap = "1.0.2"
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ fn current_dir() -> PathBuf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "rust-version-1.80"))]
|
||||||
mod libraries {
|
mod libraries {
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use std::sync::OnceLock;
|
use std::sync::OnceLock;
|
||||||
@@ -142,6 +143,28 @@ mod libraries {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "rust-version-1.80")]
|
||||||
|
mod libraries {
|
||||||
|
use indexmap::IndexMap;
|
||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
|
static LIBRARIES: LazyLock<IndexMap<&'static str, &'static str>> = OnceLock::new(|| {
|
||||||
|
let mut m = IndexMap::new();
|
||||||
|
|
||||||
|
include!(concat!(env!("OUT_DIR"), "/libraries.rs"));
|
||||||
|
|
||||||
|
m
|
||||||
|
});
|
||||||
|
|
||||||
|
pub(crate) fn contains(name: &str) -> bool {
|
||||||
|
LIBRARIES.contains_key(name)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) fn get(name: &str) -> Option<&'static str> {
|
||||||
|
LIBRARIES.get(name).copied()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub static BREAK_FROM_DISPATCH_LOOP_LOC: usize = 0;
|
pub static BREAK_FROM_DISPATCH_LOOP_LOC: usize = 0;
|
||||||
pub static INSTALL_VERIFY_ATTR_INTERRUPT: usize = 1;
|
pub static INSTALL_VERIFY_ATTR_INTERRUPT: usize = 1;
|
||||||
pub static VERIFY_ATTR_INTERRUPT_LOC: usize = 2;
|
pub static VERIFY_ATTR_INTERRUPT_LOC: usize = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user