Debian Codegraph @

README.md

raw symbols SCIP
1 # glibc_musl_version
2
3 A Rust library for detecting the installed glibc or musl version on Linux systems.
4
5 Similar to [glibc_version](https://crates.io/crates/glibc_version) crate, but it supports also musl and have 0 additional dependencies.
6
7 ## Usage
8
9 Add to your `Cargo.toml`:
10
11 ```toml
12 [dependencies]
13 glibc_musl_version = "0.1"
14 ```
15
16 Example usage(you can run it via `cargo run --example print_libc`):
17
18 ```rust
19 use glibc_musl_version::get_os_libc_versions;
20
21 fn main() {
22 match get_os_libc_versions() {
23 Ok(versions) => println!("glibc/musl: {versions}"),
24 Err(e) => eprintln!("Error: {e}"),
25 }
26 }
27 ```
28
29 ## Note
30 I wanted also to get the version of libc used by the binary (because not always the system libc is used), but I didn't find any reliable and fast way to do it. If I find a good method, I will try to add it in the future.