3 releases

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

#177 in Build Utils

Download history 449/week @ 2022-06-02 452/week @ 2022-06-09 456/week @ 2022-06-16 600/week @ 2022-06-23 1089/week @ 2022-06-30 937/week @ 2022-07-07 1241/week @ 2022-07-14 1442/week @ 2022-07-21 1130/week @ 2022-07-28 725/week @ 2022-08-04 477/week @ 2022-08-11 387/week @ 2022-08-18 1100/week @ 2022-08-25 789/week @ 2022-09-01 699/week @ 2022-09-08 1154/week @ 2022-09-15

3,807 downloads per month
Used in 2 crates (via deltalake)

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

~1–1.3MB
~37K SLoC