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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
teru0x1
July 24, 2023
Programming
0
390
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
510
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.6k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
2k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.5k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.6k
Goと定数 DMM.go #3
teru0x1
0
2.7k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
590
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
120
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
150
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
110
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.8k
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
280
TipKitTips
ktcryomm
0
150
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
230
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
350
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
880
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
180
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
670
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
GraphQLとの向き合い方2022年版
quramy
50
14k
A Modern Web Designer's Workflow
chriscoyier
698
190k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
230
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
300
The Language of Interfaces
destraynor
162
26k
Documentation Writing (for coders)
carmenintech
77
5.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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!