Rust has the ability to check configuration at build time with, e.g., #[cfg(target_os = \"linux\")] or if cfg!(target_os = \"linux\") {...}, where
#[cfg(target_os = \"linux\")]
if cfg!(target_os = \"linux\") {...}
You can also use this command: rustc --print target-list.
rustc --print target-list
Each triple are formatted as follows: {arch}-{vendor}-{sys}-{abi}.
For example, the triple 'arm-unknown-linux-gnueabihf' refers to: