Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
320
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
210
アニメがエンジニアをつなぐ!「エンジニアニメ」勉強会が巻き起こすCo-Creationの波
ohmori_yusuke
0
180
組織が大きく変わろうとするとき、自分はどうありたいかを考えている
ohmori_yusuke
19
6.9k
技術以外をきっかけに交流するエンジニア向け勉強会
ohmori_yusuke
0
73
デザインって“感覚”だけじゃないVibe Codingからの気づき
ohmori_yusuke
3
110
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
170
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
1
670
Other Decks in Programming
See All in Programming
Vibe codingでおすすめの言語と開発手法
uyuki234
0
110
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
440
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
530
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
3.7k
Basic Architectures
denyspoltorak
0
100
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
590
AIコーディングエージェント(skywork)
kondai24
0
200
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Developing static sites with Ruby
okuramasafumi
0
320
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
69
Speed Design
sergeychernyshev
33
1.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
0
160
RailsConf 2023
tenderlove
30
1.3k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
The Curse of the Amulet
leimatthew05
0
4.6k
The SEO Collaboration Effect
kristinabergwall1
0
310
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
94
The Art of Programming - Codeland 2020
erikaheidi
56
14k
How to make the Groovebox
asonas
2
1.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
68
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 でコードを公開しているので 見てください! • 作ってみると楽しい
ご清聴ありがとうございました🙇