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
780
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
130
Bézier Curves
subdigital
1
4.9k
Buckets of Code
subdigital
0
1.9k
Building 5 Calls for iOS
subdigital
0
94
tvOS Workshop
subdigital
1
120
Swift Solutions
subdigital
2
440
iOS 8 Networking
subdigital
4
890
iOS 8 App Extensions
subdigital
1
360
Effective Networking with iOS 8 and Swift
subdigital
4
1.6k
Other Decks in Programming
See All in Programming
Microservices rules (July 2024) : what good looks like
cer
PRO
0
1.6k
How to use Macrobenchmark
veronikapj
0
160
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
開発部に不満を持っていたCSがエンジニアにジョブチェンしてわかった「勝手に諦めない」ことの大切さ
sakuraikotone
28
16k
ドメイン駆動設計の実践
masuda220
PRO
19
5.2k
3 Effective Rules for Success with Signals in Angular
manfredsteyer
PRO
0
120
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
Play Billing Library 7.0.0 変更点まとめ@potatotips#88
kako351
0
160
OpenAI/Gemini APIを使って EPUBを翻訳するCLIツールをつくってみた
tomiyan
0
790
Harnessing Large Language Models for Training-free Video Anomaly Detection
tereka114
1
1.3k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
20
1.3k
Optimizing for Happiness
mojombo
373
69k
Code Review Best Practice
trishagee
58
16k
Statistics for Hackers
jakevdp
792
220k
Making Projects Easy
brettharned
111
5.7k
It's Worth the Effort
3n
181
27k
Building an army of robots
kneath
301
42k
Stop Working from a Prison Cell
hatefulcrawdad
266
20k
Done Done
chrislema
179
15k
The World Runs on Bad Software
bkeepers
PRO
63
11k
Music & Morning Musume
bryan
43
5.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
357
18k
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