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.
We may earn a commission for purchases using our links. Learn more.
'Grounded' interview: What's next for Microsoft's little big adventure
Grounded from Obsidian Entertainment is one of Xbox Game Studios' biggest new IPs in recent years, and in November, it's about to get a large aquatic update. Here's our interview with Game Director Adam Brenneke, ahead of Grounded's Pond Update.
Review: Kensington's Orbit Fusion trackball mouse is a bit pricey at $70
Kensington makes some great trackball mice, and the Orbit Fusion is a new addition to its arsenal. We've been using it for a few weeks to see how it measures.
Review: Ghostrunner works well, but is held back by frustrating combat
Ghostrunner is a first-person platformer that shows a lot of promise, thanks to its excellent visuals, music, and parkour platforming. Unfortunately, the game stumbles thanks to its repetitive levels and clunky combat.
Protect your Surface Pro 7 with one of these great cases
You have a Surface Pro in your hands and you want to protect it. This roundup of cases compatible with Pro 4, Pro (2017), Pro 6, ad Pro 7 covers rugged and stylish options so that you find something you like.