Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Move for Libra written in Rust
Search
cipepser
July 30, 2019
Programming
3.5k
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
710
layerx-fde-practices
cipepser
7
3.6k
NIKKEI Tech Talk#38
cipepser
0
1.3k
LayerXにおけるFDEについて
cipepser
4
4.2k
20250725-bet-ai-day
cipepser
4
740
Criterion-rs
cipepser
0
190
Practical Anonify
cipepser
2
940
procedural-macros
cipepser
0
220
How IBLT Works
cipepser
0
300
Other Decks in Programming
See All in Programming
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
250
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
650
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
170
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
1
270
R8 の設定見直しでアプリサイズ削減
andpad
0
240
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2k
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.1k
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.7k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
120
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
240
sbt 2.0: takeoff
eed3si9n
0
180
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
190
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Amusing Abliteration
ianozsvald
1
370
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
620
Claude Code のすすめ
schroneko
67
230k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
300
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
590
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
For a Future-Friendly Web
brad_frost
184
11k
Writing Fast Ruby
sferik
630
63k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
The untapped power of vector embeddings
frankvandijk
2
2k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
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くらい