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
280
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
3k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.5k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
7.8k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.4k
Goと定数 DMM.go #3
teru0x1
0
2.4k
はてなインターン2020成果発表
teru0x1
0
980
入門QUIC
teru0x1
0
450
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
50
Docker講習会
teru0x1
0
120
Other Decks in Programming
See All in Programming
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
2
1.5k
GPU Hash Table | レイトレ合宿10
yknishidate
0
360
カスタムしながら理解するGraphQL Connection
yanagii
0
610
Going Staff - Keynote edition
pragtob
0
420
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
330
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
4
2.2k
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.6k
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
280
Server Driven Compose With Firebase
skydoves
0
320
Mercari AI/LLM Hackathon TeamBの発表資料
imaikosuke
0
200
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
0
1.2k
僕がつくった48個のWebサービス達
yusukebe
17
16k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.1k
Building an army of robots
kneath
302
42k
Docker and Python
trallard
40
3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Designing Experiences People Love
moore
138
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
GraphQLとの向き合い方2022年版
quramy
43
13k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Side Projects
sachag
452
42k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
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!