An experimental Rust-powered production runtime for Next.js.
It serves the output of an official next build from a Rust
HTTP server, and runs the compiled server code in embedded V8.
Why NextRS? · Quick start · Compatibility · Docs · Releases · Roadmap
You develop and build your application with Next.js, exactly as today.
Where you would run next start, you run nextrs start. Static files and
prerendered pages are answered by Rust. Dynamic routes run Next.js's own
compiled handlers inside embedded V8, so no separate Node.js server process
serves the application.
NextRS is a research project. It explores whether Next.js production serving can become more predictable and efficient by giving the HTTP layer, caching and resource limits to Rust, while staying compatible with the framework's own build output.
Warning
Experimental. NextRS is tested with Next.js 16.4.x on Linux x86_64 and has not run in production. It does not support every Next.js feature or every Node.js package. Do not expose it to untrusted traffic before reading the security notice.
A Next.js application reaches production in two steps: next build
compiles it, and a server, normally next start, answers requests with
that output. NextRS is an alternative for the second step only.
| Next.js today | With NextRS | |
|---|---|---|
| Your code | Next.js and React | Unchanged |
| Develop | next dev |
next dev |
| Build | next build (Node.js) |
next build (Node.js) |
| Serve in production | next start (Node.js) |
nextrs start (Rust + embedded V8) |
| Your backends | APIs, databases, auth | Unchanged, separate processes |
It is written in Rust, with axum and
Tokio for HTTP, and embeds the V8 JavaScript engine (through deno_core)
to run the parts of Next.js that must execute JavaScript. It reads the same
.next directory next start reads, and treats next start as the
reference: a response counts as compatible only when it matches what the
official server returns for the same build.
Node.js is a mature, reliable runtime and remains the standard choice for Next.js. NextRS is not an attempt to replace Node.js. It asks a narrower question: can a purpose-built production runtime serve Next.js applications more efficiently while preserving the framework's behavior?
A production server does more than execute JavaScript. It handles HTTP, serves static assets, manages caches, compresses responses and manages system resources. Many of these responsibilities do not inherently require JavaScript execution. NextRS handles supported serving paths in Rust and uses embedded V8 for the Next.js handlers that need JavaScript.
What we are working toward:
- Lower memory consumption. Reduce runtime overhead and make memory use more predictable, especially in resource-constrained containers.
- Better CPU efficiency. Reduce unnecessary JavaScript work and request-processing overhead.
- Predictable performance. Improve latency consistency and throughput under concurrent workloads.
- Lower infrastructure costs. Explore whether applications can meet the same service requirements with smaller resource budgets.
- Next.js compatibility. Keep
next devandnext build, with no application rewrite for supported features, and usenext startas the behavioral reference. - Operational simplicity. Provide explicit controls for concurrency, queues, deadlines, memory, caches and outbound network access, with supervised V8 isolates. See configuration.
These are engineering goals, not guarantees. NextRS is experimental, and
some workloads are slower or use more resources than next start.
Compatibility and efficiency must be demonstrated through comparison tests
and reproducible benchmarks.
The goal is not to rewrite Next.js in Rust, but to use Rust where it makes sense and JavaScript where it is needed.
Requirements: Linux x86_64 with glibc 2.35 or later (Ubuntu 22.04+,
Debian 12+), a Next.js 16.4.x application, and Node.js for next build.
The npm package carries a precompiled binary: running NextRS needs no Rust,
Cargo or Node.js.
In your Next.js application:
# 1. Install the current release candidate (prereleases use exact versions)
npm install --save-dev @nextrs/cli@0.1.0-rc.3
# 2. Build with Next.js, as usual
npx next build
# 3. See how NextRS will serve each route, and anything it does not support
npx nextrs inspect .
# 4. Serve the build; dynamic routes need the embedded V8 runtime
npx nextrs start . --js-runtime embedded-v8NextRS listens on http://127.0.0.1:3000 by default (--port, --host).
nextrs doctor .is a read-only check of your project, build and planned options: what to change before you serve it. See Doctor.- pnpm works the same way:
pnpm add -D @nextrs/cli@<version>, thenpnpm exec nextrs …. - In production, start
./node_modules/.bin/nextrsdirectly, not throughnpxornpm start, so that SIGTERM reaches the server. - Standalone binary, Docker and pnpm details: see the
installation guide, which also covers
building from source.
Every option is in
nextrs start --helpand the configuration reference.
- Build with Next.js.
next buildproduces.nextas usual. Node.js is needed here, and only here. - Rust answers what needs no JavaScript. Static assets,
public/files, prerendered HTML and RSC payloads,next.configrouting rules and/_next/imageare served directly from Rust. - V8 runs what does. Dynamic rendering, Route Handlers, Server Actions,
ISR regeneration and
proxy.tsrun Next.js's compiled handlers in a pool of V8 isolates (--js-runtime embedded-v8). Their cache entries live in one Rust store shared by every isolate. - Your backends stay where they are. Server code reaches them with
fetch, which is denied unless--net-allownames the destination.
A V8 isolate is a memory boundary, not a security sandbox, and CPU limits apply per isolate, not per request. The architecture reference covers the request lifecycle in depth.
Statuses follow the compatibility matrix.
Experimental means it passes the comparison suites against next start
on the test applications, with the gaps the matrix lists.
| Area | What NextRS does | Status |
|---|---|---|
| Static serving | /_next/static, public/, prerendered HTML, RSC payloads and the not-found page, with Next.js's caching headers |
Supported |
| Build inspection | nextrs inspect reports how each route is served; unsupported features are refused at startup rather than served wrongly |
Supported |
| App Router rendering | Dynamic SSR with streaming, React Server Components, Route Handlers, generateStaticParams, Draft Mode |
Experimental |
| Server Actions | Forms, client calls, uploads, redirects and cookies, through Next.js's own handlers | Experimental |
| Caching and ISR | The Next.js data cache, ISR and on-demand revalidation in one cache shared by every isolate, optionally persisted (--cache-dir) |
Experimental |
| Cache Components | "use cache" (also private and remote), cacheLife, cacheTag, Partial Prerendering shells, custom cache handlers (CommonJS) |
Experimental |
| Pages Router | getServerSideProps, getStaticProps with ISR, API routes, Preview Mode, /_next/data, Next.js i18n routing |
Experimental |
| Proxy and routing | proxy.ts / middleware on the Node.js runtime; next.config headers, redirects and rewrites in next start's order; basePath, trailingSlash |
Experimental |
| Images | /_next/image in Rust, without sharp, within a memory budget |
Experimental |
| HTTP | gzip compression with a cache, byte ranges, conditional requests, deploymentId |
Experimental |
| Operations | Multi-isolate pool with supervision, outbound network policy, health and readiness probes, Prometheus metrics, JSON logs | Experimental |
| Memory and resources | Container-sized V8 heaps, memory reclamation and the balanced and low-memory profiles (opt-in); memory-aware admission, buffer budgets and file-backed prerendering (off by default) |
Opt-in; experimental |
| Diagnostics | nextrs doctor: read-only checks of the project, build, Node.js API use and runtime options |
Experimental |
Not supported: the edge runtime and WebSockets through external
rewrites.
Node.js support is a narrow layer: http, net, TCP sockets,
child_process, worker_threads and native addons are unavailable, so
many database drivers do not work in server code. The
known gaps list every
difference from next start.
NextRS is benchmarked against next start on the same Next.js build. The
chart shows one workload, dynamic App Router SSR (/books/[id]), measured
on November 18, 2026.
What it shows. With one isolate (one JavaScript thread, as next start
has), NextRS served this route at 736 req/s against 611, with a p95 of
3.30 ms against 6.26 ms, 141 MiB of anonymous memory against 376 MiB, and
1.75 ms of CPU per request against 1.92 ms. Four isolates reached
1,898 req/s on the same four CPUs; that is extra parallel JavaScript, not
an equal-worker comparison, and it used more memory (509 MiB).
What it does not show. The results come from one Intel Core i5-9400F,
a pre-release build (f5c480d) and requests without compression. In the
wider 24-workload matrix,
NextRS is not ahead everywhere: at its default two image workers it
transforms fewer images per second than next start (more with four),
one Pages Router route has a higher p95 at low load, and four isolates
scale 2.1–3.6×, not 4×. Measure your own application before drawing
conclusions. Results, environment and raw data → · Methodology →
| Stage | Experimental, developed in the open. Not production-ready; binds to 127.0.0.1 by default. |
| Published release | v0.1.0-rc.3, a prerelease, on GitHub Releases and on npm as @nextrs/cli (dist-tag next). |
| Platform | Linux x86_64, glibc 2.35+. macOS, Windows, arm64 and musl are refused. |
| Next.js | 16.4.6 (CI baseline) and 16.4.5, React 19.3.1. Other 16.x start with a warning; other majors are refused. |
| Tested on | Test applications compared response by response with next start, independent sample applications, and the unchanged Velasia Airways storefront: 101 of 111 browser tests passed at 1 and 4 isolates on November 18, 2026, with 10 mobile-only tests skipped by design (results). |
| Not yet done | Production use, cloud certification, per-request CPU limits, a validated memory envelope for small containers. See known gaps and security. |
NextRS is under active development. The roadmap focuses on expanding Next.js compatibility, improving developer experience, optimizing runtime performance, and making production behavior increasingly reliable. These are directions, not commitments: there are no dates, and priorities follow what the comparison suites and measurements show.
| Theme | Direction |
|---|---|
| Developer experience | nextrs doctor is available and will keep growing. Planned: nextrs dev, a development workflow built around the official Next.js tooling; nextrs preview, to run and check a production build locally; clearer CLI errors, simpler configuration, more examples. |
| Next.js compatibility | Broader App Router and Pages Router coverage, more Node.js APIs and third-party packages, authentication and database integrations, an investigation of the edge runtime, and new Next.js versions as they ship. Full compatibility is the aim, not a promise. |
| Performance and efficiency | Throughput, latency, CPU and memory under load; isolate scheduling and multi-core use; startup time; static and image serving; allocation and memory retention, including bounding concurrent compression-cache fills, which current measurements motivate. |
| Reliability and security | Per-request execution limits, predictable resource bounds and memory use in small containers, cache correctness, request isolation, graceful shutdown and recovery, network and dependency security, observability. |
| Testing and certification | More and larger real-world applications, regression testing against next start, browser end-to-end runs, load, soak and fault-injection tests, cloud deployment validation, and performance regression tracking. |
| Deployment and platforms | Docker and deployment recipes, CI/CD integration, cloud platform guides, broader Linux coverage, and other operating systems and architectures where feasible. |
The roadmap describes each direction in more detail.
| I want to… | Read |
|---|---|
| Try it on my app | Getting started · Installation · CLI · Doctor |
| Know whether my app will work | Compatibility |
| Tune limits, caching, networking and images | Configuration |
| Deploy and operate it | Deployment · Security · Troubleshooting · Release guide |
| Understand the design | Architecture · Distribution |
| Check the numbers | Performance · Benchmarks and methodology |
| Contribute | Contributing guide · Development · Testing |
| See everything | Documentation index · Changelog |
Contributions are welcome, and some of the most useful ones need no Rust:
- Try NextRS on your application and
open an issue with what
worked and what did not. Include the output of
nextrs inspectandnextrs doctor --json. - Report a compatibility difference from
next start, ideally with a small reproduction. - Improve the documentation where it confused you.
The code is five Rust crates under crates/: the build reader,
the HTTP server, the V8 runtime, the image engine and the CLI
(repository structure).
For code changes, please open an issue before starting anything large.
Every change must pass cargo fmt, clippy -D warnings and the tests;
changes to serving behavior should also pass the comparison suites against
next start. The contributing guide covers setup, the
checks and the workflow. Report security issues privately, as
SECURITY.md describes.
Licensed under either of MIT or Apache-2.0,
at your option. Release archives and the npm package also carry the license
and notice texts of every bundled third-party component
(THIRD-PARTY-LICENSES.txt), including V8 and the Deno JavaScript compiled
into the binary.
NextRS is an independent project. It is not affiliated with, endorsed by or supported by Vercel or the Next.js team. "Next.js" is a trademark of Vercel, Inc.