All Blog Posts

Upcoming Webinar

When to Migrate to the M1 Mac
Thursday, Feb 4, 2021
12 PM EDT / 9 PM PDT

Grab a seat

Check this out

A new virtualization layer for Mac build infrastructure.

Try Orka

Server-Side Swift Now Runs on Mac, Linux, and Windows

Swift logo with Apple, Windows and Linux logo

First released in 2014, Swift is a general-purpose programming language that tackles the particular task of interoperability with the massive body of code written in Objective-C that had been, and continues to be, written for Apple devices.

Originally written to run in the front-end on devices, Swift –  and the Swift community at large – has quickly expanded the scope of the language to include server-side code.

Although, there have been some notable bumps in the road to widespread adoption of Swift on the server – perhaps most notably IBM’s step back from the platform earlier this year – the performance benefits of this modern, object-oriented, statically-typed language is still very attractive to iOS developers looking to work on the backend in a familiar language.

Moreover, server-side Swift continues to appeal to the development community at large given the inherent performance increases as compared to a number of other popular server-side languages and their associated frameworks.

As a testament to that continued developer community enthusiasm, the Swift language has broadened its horizons, and can now run on Mac, Linux, and Windows.  

Swift on the Server for macOS

Perhaps not surprisingly, the lion’s share of the server-side Swift Work Group’s contributions have been focused on macOS. As such, macOS is still by far the most popular operating system for running Swift in the backend.

Moreover, as IBM was invested in Swift on the server, the Kitura web framework that they were working on has made great strides. Still, though, the general uncertainty around the longevity of the framework, and Kitura’s reliance on programming languages other than Swift, has fed a growing interest in Vapor, a second server-side Swift web framework.

Vapor version 4.0 was recently released, and there is a healthy buzz around this framework for good reason. It requires only one language, Swift, and the static typing that makes Swift blazing fast in the first place is not lost in the mix.

Swift on the Server for Linux

Swift on Linux is certainly possible, but it is trailing behind efforts to get Swift on macOS further down the road. That said, compiler support is generally available, and web development with the Vapor framework is currently available on select Linux distributions.

Swift on the Server for Windows

One step further down the readiness ladder, Swift support for Windows is in its infancy, but compiler support for Windows is now a thing. And although this endeavor may seem fruitless to some, there is significant chatter about porting Swift-based UI functionality to Windows for desktop applications.

Takeaways

Server-side Swift is here to stay. Although this effort has had some notable bumps in the road, there is a well-orchestrated effort underway to continue to build out this platform. This progress has largely been focused on Swift running on Mac servers, and then to a lesser extent Linux servers, and finally, Windows servers can now compile and run Swift.

You May Also Like

Was this article helpful?

Vote Submitted
Oops! Something went wrong while submitting the form.
Vote Submitted
Oops! Something went wrong while submitting the form.
Return to Blog Home