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.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
680
layerx-fde-practices
cipepser
7
3.6k
NIKKEI Tech Talk#38
cipepser
0
1.3k
LayerXにおけるFDEについて
cipepser
4
4k
20250725-bet-ai-day
cipepser
4
720
Criterion-rs
cipepser
0
190
Practical Anonify
cipepser
2
930
procedural-macros
cipepser
0
220
How IBLT Works
cipepser
0
290
Other Decks in Programming
See All in Programming
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.9k
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
260
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.7k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
110
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
170
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
150
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
4
410
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
540
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.8k
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Practical Orchestrator
shlominoach
192
12k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Believing is Seeing
oripsolob
1
240
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Rails Girls Zürich Keynote
gr2m
96
14k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
440
Music & Morning Musume
bryan
48
7.4k
Building AI with AI
inesmontani
PRO
1
1.3k
Building an army of robots
kneath
307
47k
Agile that works and the tools we love
rasmusluckow
331
22k
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くらい