stanislav-tkach / os_info

Rust library to detect the operating system type
MIT License
171 stars 51 forks source link

feat: Add architecture information for Windows targets #345

Closed Killavus closed 1 year ago

Killavus commented 1 year ago

First of all, thank you for introducing an architecture method for os_info!

I've noticed that on Windows targets architecture information is not provided. This pull request solves this issue by using GetNativeSystemInfo information to get processor architecture.

Since this API returns this information as an u16, I've decided to map this to uname format to make output similar to what Linux / other OSes report when calling architecture(). Since I couldn't find a proper source of uname -m enum, I've decided to rely on Debian architecture specifics document.