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
330
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
140
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.8k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.2k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.5k
Goと定数 DMM.go #3
teru0x1
0
2.5k
はてなインターン2020成果発表
teru0x1
0
1k
入門QUIC
teru0x1
0
530
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
82
Other Decks in Programming
See All in Programming
単体テストの始め方/作り方
toms74209200
0
430
從零到一:搭建你的第一個 Observability 平台
blueswen
1
890
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
400
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
230
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
160
ReadMoreTextView
fornewid
1
360
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
190
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
110
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
920
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
460
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
750
「兵法」から見る質とスピード
ickx
0
260
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
YesSQL, Process and Tooling at Scale
rocio
172
14k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Music & Morning Musume
bryan
46
6.6k
RailsConf 2023
tenderlove
30
1.1k
Designing for Performance
lara
609
69k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
780
Code Reviewing Like a Champion
maltzj
524
40k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
A designer walks into a library…
pauljervisheath
206
24k
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!