Source: Joseph Keller / iMore
What you need to know
- Swift is seeing its initial release on Windows.
- Developers can now download Swift toolchain images for Windows 10.
- Developer Readdle has been experimenting with bringing Swift to Windows for more than a year.
The Swift Project, the ongoing open-source efforts to develop the Swift programming language, has announced that an initial release of Swift is now available for Windows 10. What this means is that the tools, like the compiler and core libraries, are all available for developers right now.
From the Swift Project:
Porting Swift to Windows is not about simply porting the compiler, but rather ensuring that the full ecosystem is available on the platform. This includes the compiler, the standard library, and the core libraries (dispatch, Foundation, XCTest). These libraries are part of what enables developers to write powerful applications with ease and without having to worry about many of the details of the underlying system. There are many technical details in the story of bringing Swift to a usable state on Windows, and if you are interested in them, I would recommend checking out my talk on the topic from the LLVM Developer Conference.
With these core libraries and the flexible interoperability of Swift with C, it is possible to develop applications on Windows purely in Swift while taking advantage of the existing corpus of libraries on the Windows platforms.
The blog post goes on to demonstrate a simple calculator app that was written entirely in Swift. It was created with the Swift toolchain for Windows, as well as an installation of Visual Studio 2019.
An interesting wrinkle to the story is the involvement of Readdle, a long-time Mac and iOS developer. The company has been experimenting with Swift on Windows for more than a year as part of its efforts to bring its Spark email client to the platform:
Despite some functionality being unready as of yet, Swift on Windows turned out to be fully satisfying our needs. In fact, some third party C/C++ dependencies gave us more headaches than Swift did itself. All business logic of Spark is located in a separate Core module. A pack of modules, actually, but we refer to them as Core. This allows us to use any UI framework on the target platform: AppKit on macOS, UIKit on iOS, native UI Toolkit on Android. So, basically, we had to port Spark Core on Windows. After all initial concepts were proved, it was mostly routine day-to-day work to bring it alive on Windows.
Readdle's post dives more deeply into some of the different tools its used in its effort to build with Swift on Windows, including a number of the modules available, and covers topics like the build system and Swift's interactions with Node.js.
Swift was originally announced by Apple at WWDC 2014 as a modern language that would eventually take the place of Objective-C as the primary language for building applications for Apple's platforms. Apple has since open-sourced Swift, and the open-source project has made tools for the language available for Ubuntu, CentOS, and Amazon Linux distributions, in addition to macOS and, now, Windows.
You can download the Swift toolchain for Windows from the Swift Project website.

Lupita Nyong’o drops out of Apple TV+ show 'Lady in the Lake'
Lupita Nyong’o has now dropped out of the upcoming Apple TV+ show 'Lady in the Lake,' although the season for the change hasn't been given.

Kuo: A new HomePod is coming in late 2022 or early 2023
Apple is set to announce a new HomePod either later in 2022 or in the early part of 2023, according to analyst Ming-Chi Kuo.

Streaming reached a record share of total TV viewing last month
Streaming services were responsible for a record share of the total television viewing across the United States for the month of April, according to new data.

Protect that beautiful, big 12.9-inch iPad Pro screen
Apple's flagship iPad is almost all screen. Keep that screen looking amazing with some protection.