3 releases

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

#246 in Build Utils

Download history 30645/week @ 2024-07-27 7976/week @ 2024-08-03 5852/week @ 2024-08-10 9967/week @ 2024-08-17 9439/week @ 2024-08-24 8740/week @ 2024-08-31 10350/week @ 2024-09-07 8842/week @ 2024-09-14 4948/week @ 2024-09-21 12646/week @ 2024-09-28 7616/week @ 2024-10-05 8506/week @ 2024-10-12 9685/week @ 2024-10-19 7705/week @ 2024-10-26 12637/week @ 2024-11-02 8648/week @ 2024-11-09

39,744 downloads per month
Used in 18 crates (9 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–3MB
~54K SLoC