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
340
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
310
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.2k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.8k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.2k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.5k
Goと定数 DMM.go #3
teru0x1
0
2.6k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
540
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
87
Other Decks in Programming
See All in Programming
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
700
ワープロって実は計算機で
pepepper
2
1.4k
Understanding Ruby Grammar Through Conflicts
yui_knk
1
120
自作OSでDOOMを動かしてみた
zakki0925224
1
1.4k
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
1
290
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
880
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
140
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
110
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
470
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
960
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
1
210
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
110
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
The Cult of Friendly URLs
andyhume
79
6.5k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Into the Great Unknown - MozCon
thekraken
40
2k
Docker and Python
trallard
45
3.5k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building Adaptive Systems
keathley
43
2.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Documentation Writing (for coders)
carmenintech
73
5k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
560
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!