Swift goes Open Source! :)

  News     December 7, 2015  

Swift is now open source! We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere.

That’s how the Swift team announced in the official Swift language website the – very promising – start of a new Era: Swift going open-source!

So… before debating whether Swift can become a widespread language, whether scripting in Swift is possible or how it compares with rivals like Python, PHP, Ruby and the likes – in terms of efficiency, speed, innovation, let’s see how you can install it on *nix.

 Development Snapshots

All latest development snapshots, for OSX and Linux can be found here.

Are you ready? Let’s go then…

Installing Swift on Ubuntu

 Minimum Requirements

So far, according to Apple, only Ubuntu 14.04 or 15.10 (64-bit) are supported.
Though chances are wider support is expected to follow soon.

1. Install dependencies
sudo apt-get install clang libicu-dev
2. Download Swift

E.g. for the latest binary release (for 15.10 – 2.2 Snapshot)

wget https://swift.org/builds/ubuntu1510/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu15.10.tar.gz

* Optionally, you can also follow the instructions here – steps 3 and 4 – and download the appropriate PGP keys

3. Extract
tar xzf swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu15.10.tar.gz
4. Setup paths
export PATH=/path/to/usr/bin:"${PATH}"

And that’s it! You’re ready to go!

If you’re getting starting now with Swift, have a look at a simple Hello World in Swift, browse through our free Swift Cookbook with over 120 practical, ready-to-use recipes in Swift, or… just try Swift online – yep, right here in our Playground!