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
4
3.9k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.7k
バッチシステムをクラウドネイティブにするために考えたこと
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
80
Docker講習会
teru0x1
0
140
Other Decks in Programming
See All in Programming
Storybookの情報をMCPサーバー化する
shota_tech
3
1.6k
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
4
530
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
1.9k
Language Server と喋ろう – TSKaigi 2025
pizzacat83
2
530
ドメイン駆動設計とXPで支える子どもの未来 / Domain-Driven Design and XP Supporting Children's Future
nrslib
0
350
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
690
Doma で目指す ORM 最適解
nakamura_to
1
160
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
820
OpenTelemetry + LLM = OpenLLMetry!?
yunosukey
2
260
型安全なDrag and Dropの設計を考える
yudppp
5
630
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
120
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
6
340
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
25
2.8k
Agile that works and the tools we love
rasmusluckow
329
21k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
14
880
The Language of Interfaces
destraynor
158
25k
Code Review Best Practice
trishagee
68
18k
GraphQLとの向き合い方2022年版
quramy
46
14k
4 Signs Your Business is Dying
shpigford
183
22k
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!