You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
rust-lang/rfcs#3036 describes a family of predicates to target minimum versions of platform APIs. For example min_libc_version would return the version of libc. It was expected that max_* variants would be specified eventually as well 1, allowing ranges of OS versions to be targeted.
Unfortunately the RFC hasn't seen any updates in a while, but the challenges it attempts to address still exist. I'm wondering whether efg could help prototype syntax to specify ranges within attributes. It'd be neat if we could target a specific version range Windows by writing something like this:
I'm not sure what this feature should look like, but I think having the ability to specify ranges using shorthands would be neat as well. What do you think?
Footnotes
Being able to specify the maximum OS version is useful when you're writing polyfills for older versions. This would allow a developers to say something like: "This code runs on windows 10+ only", which can be leveraged to produce more optimized code. ↩