Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swift on Linux
Search
Ben Scheirman
October 13, 2016
Programming
1
860
Swift on Linux
Presented at CocoaConf Austin 2016 and Pragmaconf '16 in Verona, Italy
Ben Scheirman
October 13, 2016
Tweet
Share
More Decks by Ben Scheirman
See All by Ben Scheirman
A Promise for a Better Future
subdigital
0
160
Bézier Curves
subdigital
1
5.4k
Buckets of Code
subdigital
0
2k
Building 5 Calls for iOS
subdigital
0
130
tvOS Workshop
subdigital
1
150
Swift Solutions
subdigital
2
460
iOS 8 Networking
subdigital
4
930
iOS 8 App Extensions
subdigital
1
370
Effective Networking with iOS 8 and Swift
subdigital
4
1.7k
Other Decks in Programming
See All in Programming
HTTPじゃ遅すぎる! SwitchBotを自作ハブで動かして学ぶBLE通信
occhi
0
240
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
170
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
330
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
550
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
36
11k
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
360
複数チーム並行開発下でのコード移行アプローチ ~手動 Codemod から「生成AI 活用」への進化
andpad
0
150
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.6k
AI POSにおけるLLM Observability基盤の導入 ― サイバーエージェントDXインターン成果報告
hekuchan
0
500
SUZURIの規約違反チェックにおけるクリエイタフィードバックの試⾏錯誤/Trial and Error in Creator Feedback for SUZURI's Terms of Service Violation Checks
ae14watanabe
1
150
What's New in Web AI?
christianliebel
PRO
0
120
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Code Reviewing Like a Champion
maltzj
527
40k
Embracing the Ebb and Flow
colly
88
4.9k
The Cult of Friendly URLs
andyhume
79
6.7k
Agile that works and the tools we love
rasmusluckow
331
21k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Transcript
Swift on Linux
Hi, I’m Ben @subdigital
None
None
Written in Swift
Running on $5/mo Linux VPS
(my little secret)
Swift 1.0 Sept 2014 Swift 2.0 Swift Open Sourced Swift
3.0! Sept 2015 Dec 2015 Sept 2016
… but what does that mean? + github.com/apple
1. Swift Language, Compiler, & Debugger (with full commit history!)
None
None
None
2. Swift Core Libraries
*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*
3. Swift Package Manager github.com/apple/swift-package-manager
• Defines how modules are built • Resolves Dependencies •
Convention over Configuration
// Package.swift import PackageDescription let package = Package( name: “Foo”,
dependencies: [] )
None
4. Swift Evolution github.com/apple/swift-evolution
None
let’s play
vagrantup.com
git.io/vwJ4g
“Trusty Tahr” trusty(14.04) 64-bit
None
None
$ sudo apt-get install -y \ git \ clang \
libicu-dev
$ Demo
github.com/subdigital/ nsdateformatter
What Else?
?
Wrap your favorite C library!
Create a modulemap: module CCurl [system] { header "/usr/include/curl/curl.h" link
"curl" export * }
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
Reference from your Package.swift .Package(url: “../CCurl”, majorVersion: 0)
Doing active development? Don’t forget to update the tag…. every
time…
None
Thanks! @subdigital nsscreencast.com