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
840
Road to RubyKaigi 2025 #rubykaigi2026_saisoku
sue445
0
170
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.3k
Fix SQL N+1 queries with RuboCop #rubykaigi
sue445
2
7.5k
sue445とOSSと社内ツール #subcul_dev
sue445
0
940
Sentry GKEに リプレイス 1年間の 知見見せます / Migrated to GKE Sentry #pixivdevmeetup
sue445
0
840
Other Decks in Technology
See All in Technology
安心して変更できるWebフロントエンドの作り方
pirosikick
1
540
Sigmaで作る業務アプリ
kazushiro_honma
0
120
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
160
あるけみー式LTスライド作成術
alchemy1115
1
180
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.6k
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
270
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
160
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
680
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
150
ASTを使って影響範囲を特定する
nealle
0
160
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
150
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
870
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
620
A Modern Web Designer's Workflow
chriscoyier
699
190k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
520
Thoughts on Productivity
jonyablonski
76
5.4k
What's in a price? How to price your products and services
michaelherold
247
13k
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