Apple unveiled its new Swift programming language to much developer interest last year. Initially a closed-source project that only ran on Mac OS X and iOS, itâ€™s now an open-source project with an official Linux port. Apple is currently offering pre-built images forUbuntu 15.10 and 14.04 based on Swift 2.2.
Swift can be downloaded from the Swift project website, and Apple is hosting the codeon GitHub. The code is licensed under version 2.0 of the Apache license.
Itâ€™s all about the servers
Donâ€™t expect Linux to easily run those fancy new Mac OS X, iPhone, or iPad applications written in Swift. Those depend on various user interface libraries that arenâ€™t being open-sourced. Just as when Microsoft open-sourced .NET, Apple isnâ€™t open-sourcing the user interface bits required to bring existing desktop or mobile applications to other platforms.
Many servers run Linux, and itâ€™s that market that Apple is targeting here. A developer could write both an app and the server-side code for an app in Swift, running that code on a Linux server. Open-sourcing the platform also allows developers to improve Swift and contribute those improvements back to Apple, which benefits.
That said, there doesnâ€™t seem to be anything stopping the Linux community from taking this Swift code and running with it. It could be ported to other Linux distributions, and could even form the foundation for many Linux desktop applications in the future with some more work.
Swift could run on Windows and Android in the future, too. Apple probably wonâ€™t port it to other platforms itself, but other developers could now take that open-source code and do the work.