I’ve gotten rustc and cargo working on (Oracle) Solaris recently, thanks very much to some pointers from @vojtechkral and the work done by @nbaksalyar, and am looking at what it would take to make it part of the product.
The high-level thing that I seem to be running into is that what support there is in Rust and various crates for Solaris is targeted at Illumos, which is hardly surprising. But a handful of differences have come up, including a libc API difference in getpwuid_r(), and a lack of flock(). I’m currently sharing the x86_64-sun-solaris triple, which means there’s no way (that I know of) to conditionally compile against Oracle Solaris vs Illumos.
So the question is, what to do about that. The most straightforward path might be to introduce a new vendor/OS combination to distinguish the two. But it occurred to me that just because these particular differences exist now, they might not always – Solaris could add flock() at some point, and then we’d want to distinguish between the Solaris that had it and the Solaris that didn’t.
We could do that by having conditions specific to OS versions, but that seems like an unsupportable rathole. Since the real underlying conditions here are the presence or absence of features, it seems to me that something similar to autoconf’s feature testing is a better direction. Would there be any stomach for something like that, or is there a better architecture that I should consider?