Status on Swift for Windows

Hello All!

I'm curios about the current status on Swift for Windows. It seems that there's nothing official yet, but e.g. nightlies produced by @compnerd (Windows Nightlies). Still, the package manager seems to be missing in these builds.

Trying to build myself, I see that most of the tests don't work (swift, xctest and libdispatch) and while I think I get the compiler done, also package manager fails due to a requirement on a POSIX call that's not implemented in Windows (realpath()), which may explain why it's missing in the nightlies. Btw. I build on Win10, everything x64, VS2019.

So I basically wanted to ask if there's any timeframe for when it is planned to provide official Windows builds (if at all) and if my self-compile experience is about as good as it currently gets, i.e. if I mimic @compnerds builds correctly or if there's something still wrong in my build env.




There are patches on swift-package-manager to get it to bootstrap now with CMake 3.15. There are a couple of patches which still need to be re-visited to actually get them merged (the patches are on GitHub).

As to your point of the tests - I think that you have something not setup or built improperly. The full test suite for the compiler, standard library should pass. The test suite for libdispatch should pass. The test suite for Foundation still have some failures due to implementation items which still needs to be addressed. The XCTest test suite passes except for 2 failures which are known and diagnosed (there is a SR tracking to address the underlying issue).

See also Swift-package-manager on Windows? Sure Why Not!



Thanks for the response and happy to see that there's good progress on the SPM side! Thank you for driving this!

As to my failed test cases, it seems that a cygwin/mingw setup is required or the Windows env is not correctly detected. The tests fail with 'ln not found', 'sed not found', etc. ... any hints on this? I've tried to stick as closely as possible to the instructions at

ah, never mind. seems to be a VS2017 vs VS2019 path issue regarding the git installation path....

The recommended PATH setup is explained in the windows build instructions. Yes, the testing framework requires the Git tools to actually complete since they were written with Unix in mind.

Terms of Service

Privacy Policy

Cookie Policy