Linked here is a draft RFC for a new
min_target_api_version which allows for conditional compilation depending on a minimum API set version. For example, on Windows if you only want certain code to run on Windows 10 you could write
#[cfg(min_target_api_version = "10.0.10240")]. You can find more motivation and examples in the linked draft RFC. There are explicit open questions listed in the RFC, but any and all feedback is welcome.
There is also a Zulip thread for this RFC which you can find here. Feedback is also welcome there.