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
Summon Rust from Swift
Search
Takuma Shimizu
December 06, 2019
Programming
0
620
Summon Rust from Swift
Takuma Shimizu
December 06, 2019
Tweet
Share
More Decks by Takuma Shimizu
See All by Takuma Shimizu
Swift Attributes
hokuron
0
360
Peek in Calendar implementation of swift-foundation
hokuron
0
140
MVVM
hokuron
0
37
Opaque Result Type in Swift with Rust
hokuron
0
130
Generalized accessors
hokuron
0
63
Ownership of Swift as seen from iteration and Rust
hokuron
1
620
Clean Architecture 3
hokuron
0
31
Clean Architecture 2
hokuron
0
50
Create MLで犬と猫の肉球を学習
hokuron
0
85
Other Decks in Programming
See All in Programming
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
300
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
110
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
280
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
960
103 Early Hints
sugi_0000
1
260
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
快速入門可觀測性
blueswen
0
410
Spatial Rendering for Apple Vision Pro
warrenm
0
150
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
510
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
200
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
280
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Fireside Chat
paigeccino
34
3.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
910
Git: the NoSQL Database
bkeepers
PRO
427
64k
Gamification - CAS2011
davidbonilla
80
5.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Documentation Writing (for coders)
carmenintech
67
4.5k
Side Projects
sachag
452
42k
How to Ace a Technical Interview
jacobian
276
23k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Transcript
4VNNPO3VTU GSPN4XJGU 4)*.*;65BLVNB !IPLVSPO
4VNNPO3VTU GSPN4XJGU
4XJGUQFSGPSNTGVODUJPOT XSJUUFOCZ3VTU
)PX w 6TF3VTUT''*GFBUVSF w 'PSFJHO'VODUJPO*OUFSGBDF w &YQPSU3VTUDPEFTBT$DPEFT w GVODUJPOTBOETUSVDUT FUD
w #SJEHFUIF$DPEFTJOUP4XJGU w FH 7JBCSJEHJOHIFBEFS I
IUUQTHJUIVCDPNSB%J⒎FSFODF,JU
IUUQTHJUIVCDPNSB%J⒎FSFODF,JU
TUEDMPOF$MPOF 4XJGU w $MPOFUIFJNQMFNFOUBUJPOXSJUUFOCZ4XJGU w 4PpOJTIFE3VTUDPEFCBTFJT4XJGUZ w 6TFDMBTTFTBOETIBSFUIFJSJOTUBODFTCFUXFFO DPMMFDUJPOPCKFDUT w
3FQSPEVDFTJNQMZUIFBCPWFXJUI3VTUCSJOHT PWFSIFBETBUSVOUJNF w #SJEHJOH4XJGUUP$NBZCFBCMFUPCFFYQFOTJWF
%FNP
Impl DeepDiff w 4IBSFJOTUBODFTPGBDMBTTCFUXFFO POFDictionaryBOEUXPArrayT w .VUBUFUIFJOTUBODFTUIBUUBLFGSPNUIF DictionaryBOEArrayT
struct Rc<T> w 3FGFSFODF$PVOUFE w Arc<T>"VUPNBUJD"UPNJDBMMZ3FGFSFODF$PVOUFE w 4IBSFBWBMVFCFUXFFOUXPPSNPSFPXOFST w 3FBMJ[FGFBUVSFTMJLFBOJNNVUBCMFDMBTT
w #SJOHPWFSIFBEBUSVOUJNF
struct RefCell<T> • struct Cell<T> • Rc<RefCell<T>> w 3FBMJ[FGFBUVSFTMJLFBDMBTTNVUBUJPO w
*O4XJGU BTJNJMBSUPBOPCKFDUPGBDMBTTTUPSFE CZletQSPQFSUZXJUIJOBTUSVDU w 1VUP⒎CPSSPXDIFDLVOUJMSVOUJNF w #SJOHPWFSIFBEBUSVOUJNF
$CSJEHJOH w $PFSDJPO *NQMJDJUUZQFDPOWFSTJPO • ⭕ String Unsafe<CChar>
• ⭕ Array<T> UnsafePointer<T> • ❌ Array<String> UnsafePointer<UnsafePoint<CChar>> w "OZXBZUIFTFBSFFYQFOTJWF
%FNP
3FDBQ w 3VTUJTDBQBCMFPG''* w ''*FYQPSUT$JOUFSGBDF w 4XJGUVTFTUIF$JOUFSGBDF w 3VTUJTWFSZGBTU FWFOUIPVHIOPU4XJGUZ3VTU