Rustaceans: Support for FreeBSD in os_info? reddit / freebsd ---------------------------------------------------------------------- kraileth · 2021-03-20 06:29 Is there any Rust lover among the fellow FreeBSD users here who'd take a stab at this? It's likely a very minor thing (calling `uname` and matching the output, I guess) but unfortunately still beyond my skills. The [os\_info](https://github.com/stanislav-tkach/os_info) crate is a library (and cli tool) to detect the running operating system. It detects the various Linuxen, macOS, Windows and even the Redox OS among others. Running on FreeBSD, it reports "Unknown" - and considering how Rust is getting more and more important, we surely don't want FreeBSD stay an unrecognized outsider. In November, somebody added a [feature request](https://github.com/stanislav-tkach/os_info/issues/246) asking for FreeBSD support. The author is open to that but does not have access to a FreeBSD system. I added some info on how to get what I think is the relevant data about the platform, hoping that would help FreeBSD support to land. But it might be better if the community did this and opened a PR for it. My problem is: I'm not a programmer and don't know Rust. I took Redox as an example and started doing things to it until I got FreeBSD detected. But since I don't actually know what I'm doing, it was likely pretty gross (and I couldn't get a *mod.rs* for FreeBSD working anyway). So, would anybody care to take a look? ---------------------------------------------------------------------- AGodThatCanDance · 2021-03-20 13:01 FreeBSD from 13.0 implements [os- release(5)](https://www.freebsd.org/cgi/man.cgi?query=os-release&aprop os=0&sektion=5&manpath=FreeBSD+13.0-current&arch=default&format=html), so maybe can just implement it in `linux` module similar to [OracleLinux detection](https://github.com/stanislav- tkach/os_info/blob/master/os_info/src/linux/file_release.rs#L87). ---------------------------------------------------------------------- scoobybejesus · 2021-03-20 13:01 Someone just submitted a PR. Nice. ---------------------------------------------------------------------- dlangille · 2021-03-20 16:05 URL? EDIT: it's https://github.com/stanislav-tkach/os_info/pull/253 ---------------------------------------------------------------------- nucleocide · 2021-03-20 16:19 Literally the first entry on the Pull Request tan of the linked page ---------------------------------------------------------------------- dlangille · 2021-03-20 16:20 I think you mean https://github.com/stanislav-tkach/os_info/pull/251 when clicking on os_info? ---------------------------------------------------------------------- kraileth · 2021-03-20 16:30 It's [here](https://github.com/stanislav-tkach/os_info/pull/253). A big *Thank you!* to the person who did the work BTW! :) ---------------------------------------------------------------------- dlangille · 2021-03-20 19:29 That list is dynamic and will change soon. It’s better to have the link itself.