6 ms·
I don't understand why compilers drop old Windows compatibility. It makes no sense to me. They emit executable code which looks the same on Windows XP or on Win
by vbezhenar 3y ago
I don't understand why compilers drop old Windows compatibility. It makes no sense to me. They emit executable code which looks the same on Windows XP or on Windows 11.
- dijit 3y agoLikely it's not a statement about true compatibility. More likely it's that they have to keep running CI pipelines on those machines, and that's painful the older the OS gets.
- deleted 3y ago[deleted]
- nevi-me 3y agoSaying you're compatible with a target means that you're testing new changes against that target so it doesn't break. I don't think they always emit code that looks the same, otherwise Windows wouldn't have that awesome compatibility mode in their binaries, where you could run a Win10 binary as if it's a WinXP one.
- lionkor 3y agoCall it partial support then
- nevi-me 3y agoWell, they're talking about "officially support", which sounds like it's sufficient. The MCP they're referring to goes into some detail about what's likely to happen. Older versions of Windows could still be community-supported if someone is willing to do so.
- binary132 3y agoI think support implies a lot that I guess they don’t want to imply.
- pie_flavor 3y agoRust platform support is tiered[0]. Tier 1 targets are automatically tested, tier 2 targets are automatically built, and tier 3 targets are best-effort. Windows 7 is tier 1 and Windows XP is tier 3; what they're going to do is change the tier 1 Windows build to 10, but the Windows XP support isn't going anywhere. [0]: https://doc.rust-lang.org/nightly/rustc/platform-support.html https://doc.rust-lang.org/nightly/rustc/platform-support.htm...
- vbezhenar 3y agoThat makes much more sense and wasn't really obvious from the announcement, thanks!
- veber-alex 3y agoThe tier 3 Windows XP target is no_std only, which makes it useless for the vast majority of developers. For all intents and purposes Rust is dropping support for anything below Windows 10. It is suggested in the MCP that a new target can be created for older versions of Windows if members of the community will step up to support it. https://github.com/rust-lang/compiler-team/issues/651 https://github.com/rust-lang/compiler-team/issues/651
- queuebert 3y agoThe question is why do newer versions of Windows break compatibility so badly?
- jeremy_wiebe 3y agoIt seems like the Rust team isn't saying that compatibility is broken, just that there is no testing or effort to ensure compatibility. In the end it's similar, but like any project, it comes down to allocation of time and resources. For something like Windows XP, I'd guess the pool of folks interested in targeting it is extremely small.
- lambda_garden 3y agoBut why not test? If we don't expect compatibility to break, then it will be little extra effort surely?
- jenadine 3y agoRust also has a standard library. They may want to use new API for threads, file system access, and other things provided by the std.
- aseipp 3y agoBecause those people can just keep using older versions of the compiler if they need binaries to run on those platforms (easier than ever with tools like rustup), and because actually maintaining things like build farms and testing a platform takes a lot of work.
- CuriousCosmic 3y agoI'd recommend reading the MCP[1] they linked regarding the decision as well as their target tier policy [2]. They are dropping tier 1 support for Win 7 and Win 8. That means they are no longer going to guarantee that the project builds on those platforms and passes all tests via CI. As long as it is feasible they will probably keep CI runs for those platforms and if interested parties step up and provide sufficient maintenance support, it will remain tier 2. i.e a guarantee that it builds on those platforms via CI but not necessarily that all features are supported and guaranteed via passing tests. If interested parties can provide sufficient maintenance that all tests continue passing, it will be tier 1 in all but name. However the rest of the development community won't waste their time with issues like Win 7 and 8's partial support for UTF-8. And once CI stops being feasible for the compiler team to host, it'll drop down to tier 3. If there's sufficient interest from the community towards maintaining these targets, in practice you should see comparable support to with tiers 1 or 2 however now any CI will be managed externally by the community and the compiler team will stop worrying about changes that could break compilation on those targets. TLDR: They aren't saying "it'll no longer work" but rather "if you want it to stay maintained for these targets, you have to pitch in dev hours to maintain it and eventually support the infrastructure to do this because we don't see a reason to continue doing this". So if you care for these targets, you'll have to contribute to keep it maintained. [1]: https://github.com/rust-lang/compiler-team/issues/651 https://github.com/rust-lang/compiler-team/issues/651 [2]: https://doc.rust-lang.org/rustc/target-tier-policy.html https://doc.rust-lang.org/rustc/target-tier-policy.html
- gilcot 3y agoThanks for that clarification. Wasn't obvious for everybody at first read.
- richardwhiuk 3y agoTier 1 Rust Targets run all CI tests, and block tools - so it's about CI infrastructure and maintenance of that I think
- flohofwoe 3y agoI bet that's mainly for stdlib features.
- masklinn 3y ago> Currently Windows 7 and 8 are listed as Tier 1 supported platforms. However, this has not been true for a long long time. We simply do not have the testing infrastructure. And with so much software now abandoning Windows 7 and 8 (everything from Git to Go to every major browser), continuing to provide the little support that we do is only getting more difficult. There is also a lack of vendor support for these targets. The main effect is to split out Windows 7 and Windows 8 as their own targets, such that > it also leaves open the door for new targets that can commit to broader support And thus > Individuals or organisation(s) who can commit to providing some level of legacy testing and support should go through the normal process for creating new targets. Feel free to apply.
- jcranmer 3y agoBecause newer versions of kernels add new userspace APIs that can be hard to work around if it's not present. For example, Linux 3.7 added getrandom, which is a much easier way to get CSPRNG data from the kernel than /dev/urandom. With regards to Windows, I believe Windows 7 added some multithreading helpers that make mutex support much more performant compared to what you would have to do on XP or Vista. So, no, the executable code is not the same on XP or 11.
- drtgh 3y agoIt will be interesting in the future to read the "oh, Windows 10 is no longer tier-1 !!" when the bell arrives at their windows. PS: Good job Microsoft, receive our acknowledgment. Say hello to the busy telemetry guys. /s
- kibwen 3y ago> It will be interesting in the future to read the "oh, Windows 10 is no longer tier-1 !!" when the bell arrives at their windows. It's certainly bound to happen someday. Rust has a lower bound on official support for every OS, not just Windows. For example, Rust doesn't support compiling for Linux kernels older than 2012.
- codelikeawolf 3y agoI've worked pretty extensively with the Win32 API and Go. I needed to target Windows XP and had to use an older version of Go for stuff like reading/writing files, networking, etc. From what I could gather, newer versions of the Win32 API add abstractions that make common operations require less API calls. I remember needing to use 9 separate Win32 API calls just to bring a window to the foreground and set focus to it. So I think part of the reason Go drops support for older versions of Windows is they were able to simplify code on _their_ end by leveraging these new abstractions. I imagine Rust might be doing the same thing? This is all pure speculation and my memory is fuzzy on this, so take this with a grain of salt.
- pjmlp 3y agoNo they don't, Visual C++ and .NET JIT take advantage of CPU instructions as per minimal supported CPU. There also a couple of Win32 APIs used alongside the related frameworks.