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
250
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
3
640
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.4k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
7.6k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.4k
Goと定数 DMM.go #3
teru0x1
0
2.4k
はてなインターン2020成果発表
teru0x1
0
950
逆求人フェスティバル
teru0x1
0
62
入門QUIC
teru0x1
0
430
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
42
Other Decks in Programming
See All in Programming
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Jetpack for KMP
fornewid
1
290
英語
s_shimotori
1
220
DMMプラットフォームにおけるTiDBの導入から運用まで
pospome
7
3k
小さな開発会社を作った理由
polidog
0
1.9k
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
310
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Architectures with Lightweight Stores: New Rules and Options
manfredsteyer
PRO
0
100
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
Terraformテスト入門
msato
0
540
Microservices rules (July 2024) : what good looks like
cer
PRO
0
1.6k
CSC307 Lecture 09
javiergs
PRO
1
500
Featured
See All Featured
Navigating Team Friction
lara
181
13k
Side Projects
sachag
451
42k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
Building a Scalable Design System with Sketch
lauravandoore
458
32k
GraphQLの誤解/rethinking-graphql
sonatard
59
9.6k
Documentation Writing (for coders)
carmenintech
63
4.2k
Building Effective Engineering Teams - LeadDev
addyosmani
47
2.2k
Music & Morning Musume
bryan
43
5.9k
Raft: Consensus for Rubyists
vanstee
134
6.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
262
13k
The Cost Of JavaScript in 2023
addyosmani
31
4.7k
Designing for humans not robots
tammielis
247
25k
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!