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
380
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
470
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.5k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.9k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.5k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.6k
Goと定数 DMM.go #3
teru0x1
0
2.6k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
580
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
110
Other Decks in Programming
See All in Programming
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
340
CSC307 Lecture 04
javiergs
PRO
0
650
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
380
Oxlintはいいぞ
yug1224
5
1.1k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
970
rack-attack gemによるリクエスト制限の失敗と学び
pndcat
0
260
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
210
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
810
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
5
4.2k
Graviton と Nitro と私
maroon1st
0
170
dchart: charts from deck markup
ajstarks
3
970
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
600
Ruling the World: When Life Gets Gamed
codingconduct
0
130
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Technical Leadership for Architectural Decision Making
baasie
1
220
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
95
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Code Review Best Practice
trishagee
74
19k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
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!