os_info
os_info copied to clipboard
Try to use uname from nix or libc crates
Perhaps it would be better to use a function from one of these crates instead of invoking the uname process.
Sadly I learned that uname -o doesn't have a (portable?) programmatic API. Other uses of uname can probably be replaced though.
I did find https://docs.rs/platform-info/latest/platform_info/, which hardcodes the OS: https://docs.rs/platform-info/latest/src/platform_info/lib_impl.rs.html