I'm in the slightly unfortunate situation where I need to not only write platform-specific code, but I even need distro-specific (it's a build system crate, which needs to know about native packaging, and place its output files in distro-specific directories).
I have to admit, I was kind of surprised at how easy it was to get this working using
build.rs script. That said; I discovered when reading an os-release spec that I'm making certain assumptions that won't necessarily hold true. I can solve those specific issues, but I realized I would be more comfortable relying on a solution by someone who already knows all the caveats. Is there is a more official way to do this?