3 releases
0.1.2 | Mar 24, 2021 |
---|---|
0.1.1 | Mar 24, 2021 |
0.1.0 | Mar 24, 2021 |
#264 in Build Utils
37,604 downloads per month
Used in 18 crates
(9 directly)
5KB
74 lines
glibc_version
Crate to help rust projects discover GNU libc version at build time. Expected
to be used in build.rs
.
Usage
let ver = glibc_version::get_version().unwrap();
println!("glic version: {}.{}", ver.major, ver.minor);
lib.rs
:
Crate to help rust projects discover GNU libc version at build time. Expected to be used in
build.rs
. Note that this crate is only expected to work under cfg(target_env = "gnu")
, so
please guard the usage under relevant configuration predicates.
Example
let ver = glibc_version::get_version().unwrap();
if ver.major >= 2 && ver.minor >= 28 {
println!("cargo:rustc-cfg=glibc_renameat2");
}
Dependencies
~2.2–3MB
~55K SLoC