Hacker News AI · 2026/10/22 00:34:16

Rust off Rails 发布 用 Markdown 规范驱动 AI 生成全栈应用

原标题:Rust off Rails: The opinionated web stack for the AI era
68AI 研判分
核心综述

Rust off Rails 推出了一种“零代码框架”理念,通过 60 个 Markdown 文件定义技术栈约定,指导编码智能体自动生成符合规范的 Rust 全栈 Web 应用。该工具旨在解决 AI 编程中架构不一致的问题,让开发者专注于需求描述而非样板代码编写。

报道全文原始报道全文

本文目录20 个章节

A web framework that ships zero lines of code

The opinionated web stack for the AI era.

Rust off Rails is a set of Markdown files that tell coding agents how to build a full-stack Rust web app: one blessed stack, one layout, one way to do each thing. The convention lives in the prose. The agent writes the code.

文本
curl -fsSL https://rustoffrails.org/install.sh | sh

or in Claude Code: /plugin marketplace add rust-off-rails/rustoffrails

Read before you pipe: the install script · INSTALL.md

Play3 Railboard: a live Kanban built by AI in 7 prompts 3 · Watch on YouTube Get started Read the philosophy →

  • 0 lines of framework code
  • 60 Markdown files
  • 2 databases, same code

~/code/bookshelf, claude An illustrated agent session: the /offrails command, the interview, the plan, the generated files and the tests passing on SQLite and Postgres.

  1. /offrails bookshelf: people track and review books, with an API for a mobile app later

  2. ? Accounts? a) magic link (Recommended) b) email + password c) invite-only d) none
  3. › a
  4. ? Who owns data? a) each user (Recommended) b) teams c) shared
  5. › you decide
  6. ? Frontend? a) htmx (Recommended) b) inertia c) spa d) api
  7. › b
  8. ? UI library? a) React (Recommended) b) Svelte
  9. › b
  10. ? API for other programs? a) none b) REST + OpenAPI c) GraphQL d) both
  11. › b
  12. ◆ Plan: inertia + Svelte · API rest · Postgres in prod (SQLite locally)
  13. Book title, author, rating 1–5 · belongs to User
  14. Review body, stars 1–5 · belongs to Book
  15. API /api/v1/books, /api/v1/reviews · bearer tokens
  16. › yes
    • migration/src/m20261013_120000_create_books.rs
    • src/models/book.rs · src/controllers/books.rs
    • web/src/pages/Books/Index.svelte (+ 71 more)
  17. ✓ cargo clippy --all-targets -- -D warnings
  18. ✓ pnpm --dir web typecheck · svelte-check
  19. ✓ cargo nextest run · SQLite · 142 passed
  20. ✓ cargo nextest run · Postgres 18 · 142 passed
  21. Definition of Done: green. Run bin/setup && bin/dev

0

The founding rule

All code is written by AI

Every line of Rust, SQL, HTML, CSS, TypeScript and every Dockerfile is written by an agent. Humans write intent: specs in product/, answers in the interview, feedback in conversation. Never code. It's the rule the others rest on: boilerplate is free, conventions are enforced by the agent, and specs stay the source of truth. Read §0.

Markdown is the framework

Where a framework would ship a library, Off Rails ships a precise spec. The job queue, sessions and Inertia adapter are rendered into your app as code you own.

!

Strong opinions, aimed at agents

Crate choice, file layout, naming, errors, tests: decided once. The agent never debates the ORM. Inconsistency is the enemy, not imperfection.

Batteries included

Auth, jobs, email, caching, uploads, realtime, deploys: every layer has a guide and a recipe, so the agent never starts from a blank page. Browse the guides.

  1. 01

Interview

Product questions only, each with a recommended default. "Who can see this?" yes; "which ORM?" never. Say "you decide" and it takes the defaults. 2. 02

Plan

A compact plan (resources, pages, jobs, assumptions) written into product/ specs with acceptance criteria. The spec is the durable record; chat is not. 3. 03

Generate

Generator recipes, run by the agent: migration → model → failing tests → controller → views, one vertical slice at a time. 4. 04

Green

fmt, clippy, tests on SQLite and Postgres, every acceptance criterion traced to a test, coverage gates. Green or it didn't happen.

Eight skills, one per job

SkillWhat it does
/offrails:newInterview → plan → app skeleton → planned features, green
/offrails:featureSpec first, then code. With no argument: build what changed in product/
/offrails:scaffoldA full resource in the app's frontend mode
/offrails:generateJobs, mailers, channels, authentication, models, migrations, tasks
/offrails:checkThe Definition of Done: fmt, clippy, tests on SQLite and Postgres
/offrails:doctorAudits the app against every convention in the docs
/offrails:deployDeploy config and a verified image; confirms before anything outward-facing
/offrails:upgradeMoves the app's vendored framework forward and migrates conventions

How you'll use it

You write intent. The agent writes everything else.

  1. 1

Say what you want, or write it in product/features/*.md. Plain English. 2. 2

The agent writes the spec, then the code: migrations, models, views, tests. 3. 3

Done means green on SQLite and Postgres, every acceptance criterion tested.

Read the guide →

  • The dev dashboard's overview: a command center with an Unhealthy verdict and five ranked problems, such as an N+1 query with 20 queries per request, a slow function and a failing test, each with a link to its evidence.

The dev dashboard's overview: a command center with an Unhealthy verdict and five ranked problems, such as an N+1 query with 20 queries per request, a slow function and a failing test, each with a link to its evidence.

Dev dashboard

  • A request trace as a waterfall for GET /dev/lab/orders/n-plus-one with 23 queries, split into method, SQL and template time, with an N+1 warning on a query that ran 20 times and the nested spans with their durations.

A request trace as a waterfall for GET /dev/lab/orders/n-plus-one with 23 queries, split into method, SQL and template time, with an N+1 warning on a query that ran 20 times and the nested spans with their durations.

Traces

  • The hot functions profiler: functions with their self and total CPU share, labelled your code, dependency or std/Tokio, above a flame graph of the sampled stacks.

The hot functions profiler: functions with their self and total CPU share, labelled your code, dependency or std/Tokio, above a flame graph of the sampled stacks.

Hot functions

  • The dev mailbox: an inbox of sample emails on the left; on the right a verification code email with the code pulled out beside a Copy button, a Checks bar with no problems, and HTML, Text, Raw and Headers tabs with Desktop, 600 px, 320 px and Dark previews.

The dev mailbox: an inbox of sample emails on the left; on the right a verification code email with the code pulled out beside a Copy button, a Checks bar with no problems, and HTML, Text, Raw and Headers tabs with Desktop, 600 px, 320 px and Dark previews.

Mailbox

  • The jobs dashboard: counters for executing, available, scheduled, retryable, discarded, cancelled and completed jobs, a throughput chart and a queue wait chart for the last hour, and the jobs running now with their progress.

The jobs dashboard: counters for executing, available, scheduled, retryable, discarded, cancelled and completed jobs, a throughput chart and a queue wait chart for the last hour, and the jobs running now with their progress.

Jobs

  • A live room: three people here now with green presence dots and a Wave link, a chat of messages, 'Casey Example is typing…', and a toast saying Blake Example waved.

A live room: three people here now with green presence dots and a Wave link, a chat of messages, 'Casey Example is typing…', and a toast saying Blake Example waved.

Presence

The dashboard costs about 1 µs per request in a release build, and is development only by default.

Take the tour →

When typing was the bottleneck…When typing is free… A library with hundreds of thousands of lines60 Markdown files A code generator binarygenerators/scaffold.md: a recipe the agent runs Convention over configurationConvention over deliberation: the agent never debates which crate to use Optimized for programmer happinessOptimized for agent correctness: compiler-checked everything Magic, to save keystrokesNo magic. Explicit code is cheap when you don't type it.

Axum·Tokio·SeaORM SQLite locally, Postgres in production, same code·Askama·Tailwind·lettre·tracing·one binary, one Docker image

FRONTEND_MODE, chosen once in the interview

htmx default

Askama templates, checked at compile time, plus htmx. No Node. For CRUD apps, dashboards, content sites (like this one).

inertia

React or Svelte pages with server-side routing and controllers, through a generated Inertia adapter. The pick when you want a JS UI.

spa

A separate single-page app plus a JSON API, for when the UI must be a standalone app. Types flow from Rust via ts-rs.

api in progress

No UI at all: a backend and a versioned API for mobile apps, partners and scripts.

UI_LIBRARY``react (default) or svelte, for inertia, spa and htmx islands API``none, rest (OpenAPI + tokens), graphql or both: a public, versioned API, independent of the UI

And in the database: a job queue, a cache and pub/sub. The database is the only infrastructure.

From Ruby on Rails

From Elixir and Phoenix

And also

fizzyer

Fizzy's boards and cards, rebuilt in Rust by agents.

  • from FreeScout In progress

A FreeScout port

A shared-inbox help desk, built by agents on another machine.

  • from Uptime Kuma Built

uptime-offrails

1530 of 1530 tests green on SQLite and Postgres.

Built with GPT-6 Luna Claude Sonnet 5.5 Meta's Muse Wonder 1 GLM 5.3 Flash via opencode The goal: small, cheap agents that get real work done too.

Read the field tests →

文本
/plugin marketplace add rust-off-rails/rustoffrails
/plugin install offrails@offrails

Then, in an empty directory:

文本
/offrails:new bookshelf: people track the books they've read and review them

The agent interviews you, confirms a plan, then builds. Skills also trigger on plain requests ("make me a new Rust web app…").

2 With Codex, Cursor, or any agent that reads AGENTS.md

文本
Read /path/to/rustoffrails/AGENTS.md and make me a new app called "bookshelf".

Generated apps carry AGENTS.md and a vendored .offrails/, so later sessions need no setup.

3 Then

Describe features in plain language, or write them as specs in product/:

文本
Scaffold Book with title:string, author:string, published_on:date, rating:integer.
Users must be logged in to create books.

The full walkthrough → How you'll use it Read the docs Star on GitHub

Rust off Rails 发布 用 Markdown 规范驱动 AI 生成全栈应用 | Today for AI