build.rs is built for the host system, and the cfg variables are set accordingly, when cross compiling the same information is presented at build script runtime via env vars CARGO_CFG_*.
Cases that may trip:
[ ] cross compiling from windows to linux
[ ] cross compiling from linux to windows or macos
[x] cross compiling from macos to linux (I took care of it already)
build.rs
is built for the host system, and thecfg
variables are set accordingly, when cross compiling the same information is presented at build script runtime via env varsCARGO_CFG_*
.Cases that may trip: