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
390
0
Share
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
More Decks by teru0x1
See All by teru0x1
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
530
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
4.7k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
2k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.6k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.6k
Goと定数 DMM.go #3
teru0x1
0
2.7k
はてなインターン2020成果発表
teru0x1
0
1.1k
入門QUIC
teru0x1
0
600
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
130
Other Decks in Programming
See All in Programming
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
ロボットのための工場に灯りは要らない
watany
12
3.3k
Coding as Prompting Since 2025
ragingwind
0
630
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
200
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.2k
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
190
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.3k
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
5.4k
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.5k
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
180
20260320登壇資料
pharct
0
150
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
670
Code Reviewing Like a Champion
maltzj
528
40k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
84
Being A Developer After 40
akosma
91
590k
Ruling the World: When Life Gets Gamed
codingconduct
0
190
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
230
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
RailsConf 2023
tenderlove
30
1.4k
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!