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
890
1
Share
Swift on Linux
Presented at CocoaConf Austin 2016 and Pragmaconf '16 in Verona, Italy
Ben Scheirman
October 13, 2016
More Decks by Ben Scheirman
See All by Ben Scheirman
A Promise for a Better Future
subdigital
0
170
Bézier Curves
subdigital
1
5.6k
Buckets of Code
subdigital
0
2k
Building 5 Calls for iOS
subdigital
0
150
tvOS Workshop
subdigital
1
170
Swift Solutions
subdigital
2
490
iOS 8 Networking
subdigital
4
960
iOS 8 App Extensions
subdigital
1
390
Effective Networking with iOS 8 and Swift
subdigital
4
1.7k
Other Decks in Programming
See All in Programming
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
990
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
3k
PHPer、Cloudflare に引っ越す
suguruooki
1
100
[RubyKaigi 2026] Require Hooks
palkan
1
220
Road to RubyKaigi: Play Hard(ware)
makicamel
1
410
実践CRDT
tamadeveloper
0
590
Making the RBS Parser Faster
soutaro
0
500
tRPCの概要と少しだけパフォーマンス
misoton665
2
230
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
140
第3木曜LT会 #28
tinykitten
PRO
0
110
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
3
970
AIと共に生きる技術選定 2026
sgash708
0
100
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Believing is Seeing
oripsolob
1
110
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
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