volt.rs is a React framework with a Rust server. You write pages exactly like in the Next.js App Router: app/ directory, layouts, Link, useRouter, the metadata API, Tailwind CSS and shadcn/ui, or with the Pages Router (pages/, getServerSideProps, next/router). The server, the loaders and the server actions are Rust. React is rendered on the server inside an embedded JavaScript engine, so production needs a single native binary and no Node.js.
&&
Why
Same app (shadcn/ui + Tailwind todo list with server actions), same machine (4 vCPU), oha -c 64 -z 10s:
| volt.rs 0.0.1 | Next.js 16.4 | |
|---|---|---|
| Dynamic SSR page | 1,977 req/s · p50 32 ms | 329 req/s · p50 186 ms |
| Static page | 36,352 req/s · p50 1.7 ms | 1,711 req/s · p50 34 ms |
| Memory, idle | 19 MB | 85 MB |
| Memory, under load | 49 MB | 268 MB |
| Cold start to first response | 73 ms | 375 ms |
| Production build | 1.1 s | 5.9 s |
| Runtime to deploy | one 4 MB binary + assets | Node.js + node_modules |
next start runs as a single Node.js process with default settings; volt renders on a pool of QuickJS workers, one per core. Benchmarks are in docs/benchmarks.md with the exact setup so you can reproduce them.
What it looks like
// server/main.rs
use *;
async
async
// app/page.tsx
import { addTodo, type PageProps } from "@volt/api";
import Form from "volt-rs/form";
export const metadata = { title: "Todos" };
export default function Home({ data }: PageProps<"/">) {
return (
<main>
<Form action={addTodo}>
<input name="title" required />
<button>Add</button>
</Form>
<ul>{data.map((todo) => <li key={todo.id}>{todo.title}</li>)}</ul>
</main>
);
}
@volt/api is generated from the Rust code: Todo and NewTodo become TypeScript interfaces, add_todo becomes a typed addTodo function, and PageProps<"/"> knows the loader returns Todo[]. Change a Rust struct and TypeScript tells you what broke.
Features
- App Router conventions:
page,layout,loading,error,global-error,not-found(nested too),template;[slug],[...slug],[[...slug]],(groups),_privatefolders; parallel routes (@slot,default) and intercepting routes ((.),(..),(...)) for modals;export const dynamic(force-static,force-dynamic,error);useSelectedLayoutSegment(s)anduseServerInsertedHTML. - Pages Router next to it:
pages/,_app,_document,404,getServerSideProps,getStaticProps,getStaticPathsandnext/routerwith router events. - Server-side rendering of React 19 with hydration, then client-side navigation with prefetching, scroll restoration and per-route code splitting.
- Streaming SSR: the shell goes out first and each
<Suspense>boundary (use(promise),lazy,next/dynamic) streams in as it resolves; crawlers get the complete page.loading.tsxshows instantly on client navigation. - Rust loaders, server actions and API routes with a generated, fully typed TypeScript client.
- Next.js route handlers and middleware:
app/**/route.ts(GET,POST, ... withNextRequest/NextResponse, JSON, binary and streamed bodies such as server-sent events,force-staticprerendering) andmiddleware.tswithnext(),redirect(),rewrite()andconfig.matcher(has/missingincluded) run in QuickJS, with a server-sidefetchlimited by[server] fetch_allow. - Forms that work without JavaScript:
<Form action={...}>posts natively (multipart, so file uploads too) and upgrades to in-place submission with pending state,useFormStatusanduseActionState. - File uploads and validation:
Filefields in#[model]inputs,ctx.multipart()in API routes,Error::validationfield errors, andctx.revalidate_pathto refresh cached pages and client route data after a mutation. - Metadata API (
metadata,generateMetadata,viewport, Open Graph, Twitter, robots, alternates, verification), JSON-LD, automaticsitemap.xml,robots.txtandllms.txt. - Metadata files:
favicon.ico,icon.*,apple-icon.*,opengraph-image.*(with.alt.txt),twitter-image.*,manifest.json,robots.txtandsitemap.xmlin any segment are served and linked from the head with sizes;app/sitemap.ts,app/robots.tsandapp/manifest.tsgenerate them in code, cached withrevalidate. - Next.js imports work:
next/link,next/navigation,next/router,next/document,next/app,next/image,next/script,next/head,next/form,next/dynamic,next/cache,next/server(NextRequest,NextResponse,connection),next/font/google,next/font/local. - Tailwind CSS v4 and shadcn/ui out of the box;
npx shadcn addworks. - CSS Modules, Sass/SCSS and PostCSS:
*.module.css/*.module.scsswith scoped class names, Sass compiled in Rust, Lightning CSS for@importinlining,url()assets, vendor prefixes and minification. - Fonts:
next/font/googleandnext/font/localcompatible loaders; Google Fonts are downloaded at build time and self-hosted, with preloading. - Images:
<Image>with thenext/imageprops (fill,sizes,quality,priority,placeholder="blur",loader,overrideSrc, ...), on-demand resizing to AVIF or WebP negotiated byAccept, allowlisted remote images, build-time blur placeholders for static imports, and limits against SVG scripts and decompression bombs. - Static prerendering with
generateStaticParams,dynamicParamsandgetStaticPaths, incremental static regeneration (stale-while-revalidate), on-demandrevalidate_path, and static export (volt export) for any static host. - Internationalized routing:
[i18n] localeswith unprefixed default locale,/de/...prefixes,Accept-Languageand cookie detection,useLocale(),<Link locale>,ctx.locale()in Rust, automatichreflangtags and localized sitemaps. base_pathandtrailing_slash, Brotli and gzip precompression, immutable asset caching, security headers, redirects and rewrites.- Dev server with React Fast Refresh (state-preserving component updates), CSS hot swap, Rust recompilation and an in-browser error overlay that keeps the page running.
- Instructions for coding agents in every generated project (
AGENTS.md) andllms.txtfor the framework itself.
How it works
volt build bundles the app twice with rolldown: an ESM build for browsers split per route, and a single-file build that the Rust server evaluates in QuickJS workers. A request is routed by hyper, the Rust loader runs, React renders the page to HTML in a worker, and the browser hydrates the same tree. Navigations fetch only the loader's JSON and the route's chunk. Details in docs/architecture.md.
Documentation
- Getting started
- Routing
- Pages Router
- Data: loaders, actions, API routes, route handlers
- Metadata and SEO
- Styling and assets
- Static generation, ISR and export
- Internationalized routing
- Configuration
- Deployment
- Coming from Next.js
- CLI
- Architecture
Status
volt.rs is at 0.0.2. The core is usable: routing (App Router and Pages Router), SSR with streaming, hydration, navigation, actions, metadata, styling, static generation and builds are covered by end-to-end tests. Not there yet: React Server Components. See CHANGELOG.md.
Contributing
Issues and pull requests are welcome. Start with CONTRIBUTING.md and AGENTS.md.