Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ブラウザの外側でWasmを使おう
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
teru0x1
July 24, 2023
Programming
410
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Transcript
8 slides
ブラウザの外側で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!
More Decks by teru0x1
See All by teru0x1
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
2.2k
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
750
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
5.1k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
2.2k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.7k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.7k
Goと定数 DMM.go #3
teru0x1
0
2.9k
はてなインターン2020成果発表
teru0x1
0
1.2k
入門QUIC
teru0x1
0
630
Other Decks in Programming
See All in Programming
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
640
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
160
Getting Started with Vibe Coding
miccheng
0
220
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
670
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
120
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
Crash Auto Pipelines
veronikapj
1
410
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
180
Next.js: The final boss of Web Performance
guaca
0
400
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
420
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Un-Boring Meetings
codingconduct
0
490
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
520
Prompt Engineering for Job Search
mfonobong
0
580
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
The browser strikes back
jonoalderson
0
1.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
A Tale of Four Properties
chriscoyier
163
24k