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
600
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
340
Peek in Calendar implementation of swift-foundation
hokuron
0
140
MVVM
hokuron
0
33
Opaque Result Type in Swift with Rust
hokuron
0
130
Generalized accessors
hokuron
0
58
Ownership of Swift as seen from iteration and Rust
hokuron
1
610
Clean Architecture 3
hokuron
0
24
Clean Architecture 2
hokuron
0
46
Create MLで犬と猫の肉球を学習
hokuron
0
80
Other Decks in Programming
See All in Programming
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
110
RubyLSPのマルチバイト文字対応
notfounds
0
120
距離関数を極める! / SESSIONS 2024
gam0022
0
280
CSC509 Lecture 12
javiergs
PRO
0
160
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
A Tale of Four Properties
chriscoyier
156
23k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
YesSQL, Process and Tooling at Scale
rocio
169
14k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Designing for humans not robots
tammielis
250
25k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Practical Orchestrator
shlominoach
186
10k
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