Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Next.js で Ruby をプログラミング&実行できるアプリを作る
Search
uutan1108
January 18, 2024
Programming
0
1.8k
Next.js で Ruby をプログラミング&実行できるアプリを作る
エンジニアの自由研究発表会vol.9
https://tech-street.connpass.com/event/305362/
uutan1108
January 18, 2024
Tweet
Share
More Decks by uutan1108
See All by uutan1108
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
5.2k
勉強会から始まった僕のDevRel~新卒エンジニアがつないだ2年間の軌跡~
ohmori_yusuke
2
360
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
260
アニメがエンジニアをつなぐ!「エンジニアニメ」勉強会が巻き起こすCo-Creationの波
ohmori_yusuke
0
230
組織が大きく変わろうとするとき、自分はどうありたいかを考えている
ohmori_yusuke
19
7k
技術以外をきっかけに交流するエンジニア向け勉強会
ohmori_yusuke
0
130
デザインって“感覚”だけじゃないVibe Codingからの気づき
ohmori_yusuke
3
170
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
220
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
1
730
Other Decks in Programming
See All in Programming
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
440
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
410
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
650
Java 25, Nuevas características
czelabueno
0
120
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
Patterns of Patterns
denyspoltorak
0
360
AIコーディングエージェント(Gemini)
kondai24
0
280
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
130
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
67
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
240
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
200
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.8k
Music & Morning Musume
bryan
46
7k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
280
Transcript
Next.js で Ruby を プログラミング&実行できる アプリを作る エンジニアの自由研究発表会vol.9 うーたん
自己紹介 • うーたん • 新卒サーバーサイドエンジニア ◦ 株式会社ゆめみ • 趣味 ◦
アニメを見ること • X ◦ @uutan1108
目次 - 作ったもの - 仕組み - Server Actions - @ruby/wasm-wasi
- 終わりに
作ったもの
None
None
Ruby のコードを Next.js のみで実行できる
仕組み
仕組み ・Server ActionsはNext.js 14でStableになった機能です。 サーバー側で関数を実行できます。 ・サーバー側の実行結果をクエリパラメータに与えリダイ レクト させます。
実行前 実行後
Server Actions
Server Actions and Mutations サーバーアクションは、サーバー上で実行される非同期関数で す。サーバーコンポーネントやクライアントコンポーネントで使 用し、Next.jsアプリケーションのフォーム送信やデータを処理し ます。 https://nextjs.org/docs/app/building-your-application /data-fetching/server-actions-and-mutations
Server Actions ・フォームのsubmitが押 さ れた時にサーバーで 関数 が実行される。 ・フォームの入力内容を 受 け取り処理をでき る。 ・onAction関数にRuby を 実行するコードを書 く 引
用:https://future-architect.github.io/articles/20231130a
wasm
WebAssembly とは何か この機能はウェブプラットフォームにとって大きな意味を持ちま す。ウェブ上で動作するクライアントアプリで従来は実現できな かった、ネイティブ水準の速度で複数の言語で記述されたコー ドをウェブ上で動作させる方法を提供します。 今回はサーバー側でWasmを実行しています。 https://developer.mozilla.org/ja/docs/WebAssembl y/Concepts
@ruby/wasm-wasi ・先ほどのonAction関数内のコー ド。 ・npmでインストールできる。 ・wasmを読み込んでユーザーから 受け取ったコードを実行する。 ・Rubyで標準入力を与え、標準 出 力を取得するコードを追加す る。
終わりに
感想 • 意外と簡単に実装できた • Next.js 14 の新しい機能 Server Actions を使ってみたが、
便利そうな気がする • OHMORIYUSUKE/ruby-web でコードを公開しているので 見てください! • 作ってみると楽しい
ご清聴ありがとうございました🙇