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
640
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
380
Peek in Calendar implementation of swift-foundation
hokuron
0
160
MVVM
hokuron
0
45
Opaque Result Type in Swift with Rust
hokuron
0
150
Generalized accessors
hokuron
0
73
Ownership of Swift as seen from iteration and Rust
hokuron
1
640
Clean Architecture 3
hokuron
0
39
Clean Architecture 2
hokuron
0
59
Create MLで犬と猫の肉球を学習
hokuron
0
94
Other Decks in Programming
See All in Programming
やっと腹落ち「スプリント毎に動くモノをリリースする」〜ゼロから始めるメガバンクグループのアジャイル実践〜
sasakendayo
1
310
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
160
英語文法から学ぶ、クリーンな設計の秘訣
newnomad
1
240
AIエージェントを活用したアプリ開発手法の模索
kumamotone
1
680
運用しながらリアーキテクチャ
nealle
0
340
‘무차별 LGTM~👍’만 외치던 우리가 ‘고봉밥 코드 리뷰’를?
hannah0731
0
470
PHPでお金を扱う時、終わりのない 謎の1円調査の旅にでなくて済む方法
nakka
1
660
CIBMTR振り返り+敗北から学ぶコンペの取り組み方反省
takanao
1
470
読もう! Android build ドキュメント
andpad
1
190
「その気にさせる」エンジニアが 最強のリーダーになる理由
gimupop
3
430
WordPress Playground for Developers
iambherulal
0
110
snacks.nvim内のセットアップ不要なプラグインを紹介 / introduce_snacks_nvim
uhooi
0
260
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
28
2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building Your Own Lightsaber
phodgson
104
6.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
690
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