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
240
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
Transcript
23 slides
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
More Decks by sue445
See All by sue445
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
3
1.5k
sue445's proposals 2026
sue445
0
210
Create Ruby native extension gem with Go
sue445
0
880
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.4k
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.6k
Other Decks in Technology
See All in Technology
正しくWeb サイトを守るためのコンテンツセキュリティーポリシー
hinalin
0
620
LLMごとの文章力を測ってみた話
yoshimura_datam
0
120
実測データからサービスの成長余力を測る。負荷シナリオ・テストデータ・限界値の設計
kazatohiei
1
190
社内アプリ基盤「Quartz」による、 非エンジニアとAIに本番デプロイを 任せても壊れないプラットフォームの設計
staka121
PRO
1
260
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
320
AIエージェントのアーキテクチャ設計
nsatoh
0
590
IVRy における AI 時代のデータプロダクトと事業開発
ivry_presentationmaterials
0
130
Claude Certified Developer – Professional 試験対策
shinoisa
0
280
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
310
OSSとミニPCと私
anatofuz
1
110
AIフレンドリーなGenerative UIをJSXで
uhyo
2
850
Kiro のリモートワークスペース: IDE は手元のままで、ワークスペースをクラウド、コンテナ、自前のマシンに置く
inariku
PRO
2
260
Featured
See All Featured
Done Done
chrislema
187
17k
How STYLIGHT went responsive
nonsquared
100
6.4k
The Art of Programming - Codeland 2020
erikaheidi
57
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Bash Introduction
62gerente
615
220k
Building AI with AI
inesmontani
PRO
1
1.4k
エンジニアに許された特別な時間の終わり
watany
109
250k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610