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
1
19
sue445's proposals 2026
sue445
0
200
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.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
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
460
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
350
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
210
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
1
790
速くなるほど、深く考える AI時代のQAに学ぶ
kobayashiyorimitsu
0
260
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
1
540
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
16
28k
Claude Codeで新規事業を伸ばせるか? Zennの試行錯誤の記録
wadayusuke
2
240
CloudTrail を推したい
kazzpapa3
1
140
お風呂場をサーバルームにしよう
yusuke427
0
350
閉域網でのAPI公開の選択肢全部比較!
takano0131
4
560
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
640
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Believing is Seeing
oripsolob
1
280
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
330
The agentic SEO stack - context over prompts
schlessera
0
1k
Thoughts on Productivity
jonyablonski
76
5.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
Practical Orchestrator
shlominoach
192
12k