3 releases

0.1.2 Mar 24, 2021
0.1.1 Mar 24, 2021
0.1.0 Mar 24, 2021

#203 in Configuration

Download history 20833/week @ 2023-10-29 34149/week @ 2023-11-05 30755/week @ 2023-11-12 33352/week @ 2023-11-19 14184/week @ 2023-11-26 17431/week @ 2023-12-03 20501/week @ 2023-12-10 16473/week @ 2023-12-17 9489/week @ 2023-12-24 14445/week @ 2023-12-31 38544/week @ 2024-01-07 40983/week @ 2024-01-14 21414/week @ 2024-01-21 34715/week @ 2024-01-28 29085/week @ 2024-02-04 29462/week @ 2024-02-11

114,936 downloads per month
Used in 13 crates (7 directly)

Apache-2.0

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.1–3MB
~53K SLoC