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
130
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
600
Clean Architecture 3
hokuron
0
24
Clean Architecture 2
hokuron
0
46
Create MLで犬と猫の肉球を学習
hokuron
0
79
Other Decks in Programming
See All in Programming
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
290
Honoの来た道とこれから
yusukebe
19
3k
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
3
1k
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.2k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
120
ActiveRecordの力でDBのメタデータを迅速に解析する
lnit
5
2.2k
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
950
EventSourcingの理想と現実
wenas
5
2k
Piniaの現状と今後
waka292
5
1.4k
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
120
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
10
2.2k
Java ジェネリクス入門 2024
nagise
0
530
Featured
See All Featured
Happy Clients
brianwarren
97
6.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Rails Girls Zürich Keynote
gr2m
93
13k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.8k
Code Reviewing Like a Champion
maltzj
519
39k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Done Done
chrislema
181
16k
Testing 201, or: Great Expectations
jmmastey
38
7k
Documentation Writing (for coders)
carmenintech
65
4.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
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