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
360
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
400
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.4k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.9k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.4k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.5k
Goと定数 DMM.go #3
teru0x1
0
2.6k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
560
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
96
Other Decks in Programming
See All in Programming
Developing Specifications - Jakarta EE: a Real World Example
ivargrimstad
0
180
Atomics APIを知る / Understanding Atomics API
ssssota
1
200
Vueで学ぶデータ構造入門 リンクリストとキューでリアクティビティを捉える / Vue Data Structures: Linked Lists and Queues for Reactivity
konkarin
1
340
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.7k
FlutterKaigi 2025 システム裏側
yumnumm
0
1.2k
関数の挙動書き換える
takatofukui
4
750
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
120
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
11
5.3k
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
3
1.4k
CSC509 Lecture 13
javiergs
PRO
0
260
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
13k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Faster Mobile Websites
deanohume
310
31k
Being A Developer After 40
akosma
91
590k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
680
How STYLIGHT went responsive
nonsquared
100
5.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
980
Raft: Consensus for Rubyists
vanstee
140
7.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
A designer walks into a library…
pauljervisheath
210
24k
Building Adaptive Systems
keathley
44
2.8k
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!