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
300
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
3.4k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.7k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.5k
Goと定数 DMM.go #3
teru0x1
0
2.5k
はてなインターン2020成果発表
teru0x1
0
1k
入門QUIC
teru0x1
0
480
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
66
Docker講習会
teru0x1
0
130
Other Decks in Programming
See All in Programming
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
230
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
200
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
140
振り返れば奴(Cline)がいる
keiyagi
0
110
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
BEエンジニアがFEの業務をできるようになるまでにやったこと
yoshida_ryushin
0
250
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
2.2k
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
260
Amazon Nova Reelの可能性
hideg
0
240
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
590
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
380
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
18
3.1k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Gamification - CAS2011
davidbonilla
80
5.1k
Become a Pro
speakerdeck
PRO
26
5.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
How to Ace a Technical Interview
jacobian
276
23k
A Modern Web Designer's Workflow
chriscoyier
693
190k
A Tale of Four Properties
chriscoyier
157
23k
Visualization
eitanlees
146
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Docker and Python
trallard
43
3.2k
Speed Design
sergeychernyshev
25
750
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!