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
Move for Libra written in Rust
Search
cipepser
July 30, 2019
Programming
3.4k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Move for Libra written in Rust
cipepser
July 30, 2019
More Decks by cipepser
See All by cipepser
long-running-tasks
cipepser
3
600
layerx-fde-practices
cipepser
6
3.4k
NIKKEI Tech Talk#38
cipepser
0
1.2k
LayerXにおけるFDEについて
cipepser
4
3.5k
20250725-bet-ai-day
cipepser
4
680
Criterion-rs
cipepser
0
180
Practical Anonify
cipepser
2
920
procedural-macros
cipepser
0
210
How IBLT Works
cipepser
0
280
Other Decks in Programming
See All in Programming
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
140
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
290
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
930
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
280
AIを紡ぐPMのお話
swdtkuy
0
100
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
370
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
450
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
120
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
660
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
350
Accessibility Awareness
sabderemane
1
180
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
380
Code Reviewing Like a Champion
maltzj
528
40k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
450
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Transcript
Rustで実装された Libra Move言語とは cipepser 2019/7/30 Roppongi.rs #1
自己紹介 • cipepser(さいぺ) • Fintertech株式会社 • Rust歴: 1年半くらい • 経歴
◦ SIerで証券系システムのネットワーク設計、構築 • 最近の趣味プロジェクト ◦ 自作Protocol Buffersデコーダ(Golang) ◦ Monkey言語のRust実装 ▪ Lexerまでは実装済み。AST設計中。 ▪ コンパイラとVMの実装までやりきりたい
本日の内容 • Libraとは • Move言語とは • ブロックチェーン上にアセットを載せる難しさ • 既存のブロックチェーン言語の課題 •
Moveの設計 • Moveに触るには
Libraとは • 2019年6月にFacebookが発表した金融プラットフォーム • ミッション「多くの人びとに力を与える、シンプルで国境のないグローバルな通貨と 金融インフラになる」 • BFTモデルのLibra Blockchainが基盤 •
とにかくメンバーが強い 1) The Libra Whitepaper - Blockchain, Association, Reserve | Libra https://libra.org/ja-JP/white-paper/#introduction 2) Facebook’s cryptocurrency partners revealed—we obtained the entire list of inaugural backers - The Block https://www.theblockcrypto.com/2019/06/14/facebooks-cryptocurrency-partners-revealed-we-obtained-the-entire-list-of-inaugural-backers/
Move言語とは • Libraでスマートコントラクトを書く言語 • Move自体はRustで実装されている ◦ 安全とセキュリティを重視 • 静的型付けのバイトコード言語 ◦
VMで実行 ◦ bytecode verifierによるチェック
デジタル・アセットをオープンシステムに載せる難しさ • Scarcity(希少性) ◦ 無から有を生み出せないこと ◦ 複製できないこと • Access control
◦ 所有者だけがアセットをコントロールできること
既存のブロックチェーン言語の課題 • 資産を直接エンコードできない ◦ 資産をIntegerで表現 ◦ 型がない ◦ エラーハンドリングはどうやって? •
Scarcityの実装が開発者に委ねられる ◦ 言語のサポートなしに、注意深く実装しなければならない • Access controlが柔軟でない ◦ 署名スキームベースが主流
Moveの設計 • first-class assets ◦ resource typeを定義できる(資産を表現) ◦ コピーと破棄は明示的に行う( copy/move)
• flexibility ◦ Move言語: modules/resources/produres ◦ オブジェクト指向言語 : classes/objects/methods • safety ◦ bytecode verifierによるoff-chain解析 • verfiability ◦ 動的ディスパッチを行わない ▪ コールグラフが複雑にならない ◦ mutabilityの制限(valueの変更はreference経由。Rustの所有権システムの力を借りる) ◦ モジュール化によるデータ抽象化
Moveにふれるには • Githubで公開されている ◦ https://github.com/libra/libra/tree/master/language • 社内ブログもご一読ください ◦ Facebook libraのMove言語でスマートコントラクトを書いてみる
▪ https://note.mu/fintertech/n/n3334c5a021e9 • とはいえ、まだまだ発展途上 ◦ 現時点ではLibra Blockchainにデプロイできない ▪ ローカルでのテストはできる ◦ ドキュメントや開発ツールも揃っていない ▪ コードハイライトやsuggestionが早く欲しい ▪ buitlinsの一覧はWPのappendixに載ってる ◦ CollectionやGenericsも将来対応するらしい( WPより) ▪ 今はByteArrayとStructくらい