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
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #k...
Search
sue445
July 13, 2026
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
KaigiEffect Kaigi 2026
の発表資料です
sue445
July 13, 2026
More Decks by sue445
See All by sue445
Create Ruby native extension gem with Go
sue445
0
850
Road to RubyKaigi 2025 #rubykaigi2026_saisoku
sue445
0
180
Kaigi Effect 2025 #rubykaigi2025_after
sue445
0
1.7k
Road to Go Gem #rubykaigi
sue445
0
3.3k
pixiv Cloud Journey #pixivmeetup
sue445
0
1.8k
Road to RubyKaigi Speaker (case sue445) #rubykaigi2023_after
sue445
0
3.4k
Fix SQL N+1 queries with RuboCop #rubykaigi
sue445
2
7.5k
sue445とOSSと社内ツール #subcul_dev
sue445
0
950
Sentry GKEに リプレイス 1年間の 知見見せます / Migrated to GKE Sentry #pixivdevmeetup
sue445
0
850
Other Decks in Technology
See All in Technology
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
270
AI臭い文章とは何なのか
nasuvitz
38
76k
GitHub Agentic Workflows を触ってみる
htkym
2
910
Claude起点の仕様駆動開発
tanakaseiya
0
280
セルフサービスのオブザーバビリティ基盤をOpenTelemetryで作る / Building a Self-Service Observability Platform with OpenTelemetry
ymotongpoo
3
500
20260929_AmazonGuardDutyの検出通知メールにAWS DevOpsAgentの調査結果を追加する
yhana
1
410
Databricksメトリクスビューはじめてのもくもく会
taka_aki
0
150
DORA_Metrics.pdf
wagnerfusca
1
140
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
130
Codex概要
ymiya55
0
170
[2026 Oracle Technical Deep Dive] AI時代のデータベース基盤をどう選ぶ? Exadata Database Serviceの選択肢と使い分け (2026年9月17日開催)
oracle4engineer
PRO
0
150
Meet AgentCore Identity Consent Portal
hironobuiga
3
150
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
ラッコキーワード サービス紹介資料
rakko
1
5.1M
Docker and Python
trallard
47
4.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Curious Case for Waylosing
cassininazir
1
550
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Between Models and Reality
mayunak
4
480
Everyday Curiosity
cassininazir
0
340
Transcript
pixiv Inc. ruby.wasmとPicoRuby.wasmに対応 した仮想DOMライブラリを作ってる話 KaigiEffect Kaigi 2026 https://andpad.connpass.com/event/395551/ sue445 2026/07/13
2 2 sue445 Engineer 自己紹介 • Go Sueyoshi a.k.a sue445
• ピクシブ所属 (2018/07〜) • インフラとかインフラ以外とか色々 • Past RubyKaigi Speaker ◦ 2019, 2023, 2025
大切なご報告 3
4 4 sue445 Senior Tech Lead シニアテックリード (2026/07〜) 🆕 •
クラウドネイティブ分野全般 ◦ AWS, Google Cloud, Kubernetes • 普通のテックリードを通り越してシニア テックリードなので 2階級特進 😇
Agenda • 今作ってる https://github.com/sue445/rb-wasm-vdom の話 5
きっかけ • 元々はRubyKaigi 2026のLTネタで作ろうと思ってた • 本編のタイムテーブル見てたら内容がhasumiさんの話 (https://github.com/picoruby/funicular)と被ってそうだったので作るの を断念した • Partyかなんかでその事をhasumiさんと話した時に「両方あっていいん
じゃない?(意訳)」みたいなことを言われたので作った(KaigiEffect) 6
sue445/rb-wasm-vdom • https://github.com/sue445/rb-wasm-vdom • ruby.wasmとPicoRuby.wasmの両方に対応した仮想DOM(人生初npm) • npmの中にRubyのソースコードがガッツリ含まれてる 7
Features: Vue.jsっぽい記法 8
Features: テンプレート内でのメソッド 呼び出し 9
Features: #if 10
Features: #each with Array 11
Features: #each with Hash 12
Demo • https://github.com/sue445/rb-wasm-vdom#examples 13
詳しいこと • ruby.wasmとPicoRuby.wasmの両方で動く仮想DOMライブラリを作った - くりにっき • https://sue445.hatenablog.com/entry/2026/07/02/185143 14
導入事例:地域.rbカレンダー 15 https://sue445.github.io/regional-rb-calendar/
jsonを読み込んでいい感じに表示 16 https://sue445.github.io/regional-rb-calendar/
地域.rbカレンダーなのでフロントエンド もRubyで実装しなおした 17 https://github.com/sue445/regional-rb-calendar/pull/429
Before: Vue.js 18 https://github.com/sue445/regional-rb-calendar/blob/4d921077/docs/js/app.js#L16-L27
After: rb-wasm-vdom 19 https://github.com/sue445/regional-rb-calendar/blob/65333d61/docs/src/app.rb#L55-L63
おまけ:ruby.wasmとPicoRuby.wasm の雑比較 20
PicoRuby.wasmの方がファイルサイズ が小さいので起動時間が早い • @ruby/head-wasm-wasi@latest (Ruby 4.1.0) ◦ ファイルサイズ:8.84MB ◦ wasmファイルをDLしてRuby
VMを起動するまでの時間:平均 863.12ms、中央値890.7ms • @picoruby/wasm-wasi@latest (Ruby 3.4) ◦ ファイルサイズ:0.52MB ◦ wasmファイルをDLしてRuby VMを起動するまでの時間:平均 157.46ms, 中央値155.9ms • c.f. ruby-wasm-startup-benchmarkを作った - くりにっき ◦ https://sue445.hatenablog.com/entry/2026/05/31/215753 21
ruby.wasmの方が使えるライブラリや メソッドが多い • 下記はPicoRuby.wasmだと使えなかった ◦ cgiライブラリ ◦ Enumerable#flat_map ◦ Enumerable#each_with_object
◦ require_relative, Dir.glob, __dir__ などのファイルシステム系 • これらを使いたければ別のメソッドを使うか自作するかruby.wasmを使う 必要がある ◦ __dir__ はPicoRuby.wasmでは使えなかったけど File.expand_path は PicoRuby.wasmでも使えた 22
ステマ • このスライドは https://github.com/k1LoW/deck を用いて作成していま す 23