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
ブラウザの外側でWasmを使おう
Search
teru0x1
July 24, 2023
Programming
0
220
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.3k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
15
7.1k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.4k
Goと定数 DMM.go #3
teru0x1
0
2.4k
はてなインターン2020成果発表
teru0x1
0
930
逆求人フェスティバル
teru0x1
0
55
入門QUIC
teru0x1
0
410
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
33
Docker講習会
teru0x1
0
110
Other Decks in Programming
See All in Programming
2 週間で Twitter Bot を作ってみた
contour_gara
0
740
Apache Hive 4 on Treasure Data
ryukobayashi
0
400
Hanami and htmx
bkuhlmann
0
220
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
490
Ruby Pattern Matching
bkuhlmann
0
930
Elm 0.19.0 Changes
bkuhlmann
0
490
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
370
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
420
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
140
見た目から始める生産性向上
ikumatadokoro
9
1.3k
敵対的ポイフル
futabato
0
120
Domain-Driven Transformation
hschwentner
2
1.5k
Featured
See All Featured
Code Review Best Practice
trishagee
56
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
64
14k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
13
8.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
[RailsConf 2023] Rails as a piece of cake
palkan
27
4k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Designing with Data
zakiwarfel
96
4.8k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
KATA
mclloyd
16
12k
The Invisible Customer
myddelton
114
12k
Done Done
chrislema
178
15k
Transcript
ブラウザの外側でWasmを使おう
本日話すこと WebAssembly(Wasm)
WebAssembly “binary instruction format for stack-based virtual machine” 実行環境: (当初)Webブラウザ
(現在) あらゆる環境 Safe: sandbox model import/export Efficient and fast: aim to executed at near-native speed Portable: language/platform independent Open and debuggable: WAT
WASI • WebAssembly System Interface • ファイルIOやネットワークIOなどのAPIセットを定めたもの ◦ POSIX的なもの •
Webブラウザの外でもポータビリティを持たせることが可能に ◦ ブラウザ内外問わず Wasmが使えるように https://github.com/bytecodealliance/wasmtime/blob/main/docs/W ASI-overview.md
Shopify function • ShopifyのインフラでECサイト開発者が作成 したコードを呼び出せる機能 ◦ Shopifyのインフラで動作 • Wasmが実行される ◦
Wasmにビルドできる言語ならなんでも使える • Wasmが採用された理由 ◦ Security ◦ Flexibility ◦ Performance https://shopify.engineering/shopify-webassembly
github.com/ncruces/go-sqlite3 • Golang製SQLite3のドライバの1つ • WasmにビルドしたSQLiteをラップし、 wazero(Go moduleとして使えるwasmラ ンタイム)から呼び出す • 既存の資産を利用しつつドライバをCGO
非依存にできる ◦ pure-goになって嬉しい ←sqlite3.wasm(1.4MB)
おわりに • Wasm/WASIとブラウザ外で使われるWasm事例を紹介 向いてそうな例 • プラットフォーム上で第三者にコードを実行させたい • ↑この際多様な言語の選択肢を提供したい • プラグインの仕組みを提供したい
◦ Proxy-Wasmなど • C/C++などの既存資産を利用したい
自己紹介 小野 輝也(@teru0x1) Software Engineer@Ubie We are hiring!