Slide 1

Slide 1 text

Swift on Linux

Slide 2

Slide 2 text

Hi, I’m Ben @subdigital

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Written in Swift

Slide 6

Slide 6 text

Running on $5/mo Linux VPS

Slide 7

Slide 7 text

(my little secret)

Slide 8

Slide 8 text

Swift 1.0 Sept 2014 Swift 2.0 Swift Open Sourced Swift 3.0! Sept 2015 Dec 2015 Sept 2016

Slide 9

Slide 9 text

… but what does that mean? + github.com/apple

Slide 10

Slide 10 text

1. Swift Language, Compiler, & Debugger (with full commit history!)

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

2. Swift Core Libraries

Slide 15

Slide 15 text

*not on Linux (yet) github.com/apple/swift-corelibs-foundation github.com/apple/swift-corelibs-xctest github.com/apple/swift-corelibs-libdispatch Foundation XCTest libDispatch*

Slide 16

Slide 16 text

3. Swift Package Manager github.com/apple/swift-package-manager

Slide 17

Slide 17 text

• Defines how modules are built • Resolves Dependencies • Convention over Configuration

Slide 18

Slide 18 text

// Package.swift import PackageDescription let package = Package( name: “Foo”, dependencies: [] )

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

4. Swift Evolution github.com/apple/swift-evolution

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

let’s play

Slide 23

Slide 23 text

vagrantup.com

Slide 24

Slide 24 text

git.io/vwJ4g

Slide 25

Slide 25 text

“Trusty Tahr” trusty(14.04) 64-bit

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

$ sudo apt-get install -y \ git \ clang \ libicu-dev

Slide 29

Slide 29 text

$ Demo

Slide 30

Slide 30 text

github.com/subdigital/ nsdateformatter

Slide 31

Slide 31 text

What Else?

Slide 32

Slide 32 text

?

Slide 33

Slide 33 text

Wrap your favorite C library!

Slide 34

Slide 34 text

Create a modulemap: module CCurl [system] { header "/usr/include/curl/curl.h" link "curl" export * }

Slide 35

Slide 35 text

Add a git tag…. $ git add . $ git commit -m “Initial commit” [master (root-commit) fa72d04] initial commit 1 file changed, 1 insertion(+) $ git tag 0.0.1

Slide 36

Slide 36 text

Reference from your Package.swift .Package(url: “../CCurl”, majorVersion: 0)

Slide 37

Slide 37 text

Doing active development? Don’t forget to update the tag…. every time…

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Thanks! @subdigital nsscreencast.com