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
230
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
sue445's proposals 2026
sue445
0
150
Create Ruby native extension gem with Go
sue445
0
870
Road to RubyKaigi 2025 #rubykaigi2026_saisoku
sue445
0
190
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.9k
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
Other Decks in Technology
See All in Technology
AWS DevOps Agentはどこまで任せられるか 〜機能の現在地と、機能拡張の実践〜
nyankotaro
0
250
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
0
430
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
0
110
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
200
Microsoft のサポート ライフサイクルを理解する
murachiakira
PRO
0
210
AIエージェント時代、Kaggleにどう取り組むか
takanao
1
190
[re:Invent2026事前勉強会(有志開催)]続きは、ラスベガスの廊下で / continue-in-the-vegas-hallway
sh_fk2
0
270
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
1.2k
背中から、背中へ ー 社外コミュニティで学んだ「雑に背中を押す」という恩送り ー / easygoing encouragement and pay forward to community
naitosatoshi
0
330
[FECONF-2026] 신대륙을 향한 카카오페이증권 프론트엔드 항해기 (이주승)
l1ghthouse
0
210
How we choose session proposals
kawaguti
PRO
0
170
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
390
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
620
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
490
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Writing Fast Ruby
sferik
630
63k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
Optimizing for Happiness
mojombo
378
71k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
440
Chasing Engaging Ingredients in Design
codingconduct
0
370
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
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