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
390
0
Share
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
530
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.7k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
2k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.6k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.6k
Goと定数 DMM.go #3
teru0x1
0
2.7k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
600
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
130
Other Decks in Programming
See All in Programming
Java 21/25 Virtual Threads 소개
debop
0
320
Rethinking API Platform Filters
vinceamstoutz
0
5.1k
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
910
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
120
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
130
PHPで TLSのプロトコルを実装してみる
higaki_program
0
730
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.4k
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
320
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
110
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
「速くなった気がする」をデータで疑う
senleaf24
0
130
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
5.3k
Believing is Seeing
oripsolob
1
100
Agile that works and the tools we love
rasmusluckow
331
21k
Navigating Weather and Climate Data
rabernat
0
160
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Utilizing Notion as your number one productivity tool
mfonobong
4
280
Crafting Experiences
bethany
1
100
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Skip the Path - Find Your Career Trail
mkilby
1
93
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
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!