I Put SnapFire FSR in an Arena Against Next.js, Astro, SvelteKit, Nuxt, Leptos and Dioxus
Updated on
DISCLAIMER: Expressed views on this blog are my own.
In October, I wrote about moving your TSX to the desktop and the terminal. That showed how far the lowering model can stretch: write once, run in a browser, an OS webview, or a terminal cell grid with zero JavaScript engines in the host process.
Since then, I went back to the original thesis and put it under load.
If you strip Node.js out of the server, lower TypeScript and JSX into data at build time, and let a native Rust host evaluate it, how does it actually hold up against the best frameworks in both JavaScript and Rust?
Not on a toy "hello world" endpoint. On a real application.
I built the same 48-product storefront across seven frameworks: SnapFire FSR (0.26.0), Next.js (16.4), Astro (7.4), SvelteKit (3.1), Nuxt (4.6), Leptos (0.8), and Dioxus (0.7), verified that every route produced identical output digests, and threw up to 256 concurrent clients at them on a 14-core Apple M4 Pro.
The full harness and raw runs are public in excsn/web_ssr_arena. Here is what came out.
The Throughput Gap
On a single-client ping, fast Node frameworks look respectable. On /products?sort=price (sorting and rendering 48 products), Astro actually edged FSR out at 1 client (7,099 vs 6,930 req/s).
Then concurrency turned on.
At 256 concurrent clients on the Catalog page:
| Framework | Runtime | Req / sec | p50 Latency | p99 Latency | Peak CPU | Resident RAM |
|---|---|---|---|---|---|---|
| SnapFire FSR 0.26 | Rust IR | 55,700 | 4.48 ms | 10.05 ms | 1,196% | 42.5 MB |
| Leptos 0.8 | Rust | 33,814 | 6.88 ms | 20.06 ms | 1,288% | 42.9 MB |
| Dioxus 0.7 | Rust | 13,002 | 19.59 ms | 25.35 ms | 1,355% | 34.4 MB |
| Astro 7.4 | Node | 8,341 | 30.44 ms | 53.23 ms | 120% | 292.2 MB |
| SvelteKit 3.1 | Node | 6,156 | 41.29 ms | 61.20 ms | 114% | 300.8 MB |
| Nuxt 4.6 | Node | 1,916 | 129.02 ms | 810.49 ms | 126% | 279.0 MB |
| Next.js 16.4 | Node | 830 | 215.52 ms | 4,341.42 ms | 126% | 502.3 MB |
Two things jump off that table immediately.
First, Node hits a single-core wall. Astro is easily the fastest JavaScript framework in the arena, beating Next.js by 10x. Still, at 8 clients and beyond, it caps around 8,500 req/s at ~120% CPU because the Node event loop cannot spread synchronous SSR across cores. Meanwhile, Next.js falls completely apart under saturation, p99 tail latency spikes to 4.3 seconds on the catalog and 10.2 seconds on a 500-row table (169 req/s vs FSR's 15,713 req/s), while burning over half a gigabyte of RAM.
Second, FSR beat pure Rust SSR. FSR's lowered TypeScript rendered the catalog 1.65x faster than Leptos with half the p99 latency (10.05 ms vs 20.06 ms), and hit 126,882 req/s on individual product pages (83x Next.js, 10.6x Astro, and ahead of Leptos at 102,065 req/s).
Why I Didn't Just Stay in Leptos
On paper, pure Rust frameworks like Leptos and Dioxus match FSR's memory discipline. Under the hood, they force trade-offs most frontend teams refuse to pay:
- The rebuild tax. Change one line on a page and wait for
rustcto re-expand view macros. Warm builds in the arena took 14.0 seconds for Leptos and 13.2 seconds for Dioxus. FSR re-lowers your TypeScript and bundles in 0.4 seconds, faster than Astro (0.5s), SvelteKit (1.3s), and Next.js (1.4s). - The WebAssembly payload. To hydrate interactivity, Leptos ships 257.1 KiB gzipped (
721.9 KiBraw) of WASM to the browser. Dioxus ships 483.2 KiB (1.3 MiBraw). FSR ships 0 KiB of WASM and 40.2 KiB of JavaScript on the interactive counter (compared to Astro's67.6 KiBand Next.js's135.0 KiB).
And when a loader actually needs raw CPU compute like running a prime sieve or aggregating 5,000 sales orders, you don't leave TypeScript behind. FSR's #[native] escape hatch lets a lowered loader call a Rust function directly:
- Prime sieve (256 clients): Pure IR runs at
1,848 req/s. Add one native call and it jumps to84,404 req/s(ahead of Leptos at73,489). - 5,000-order sales report: Pure IR runs at
6,381 req/s. Withnative, it hits112,509 req/s(ahead of Leptos at92,903and Next.js at1,481).
How 0.26.0 Got Here
Two changes drove most of the jump from the early September builds:
1. Fixing the 82% Allocator Bleed
Early flamegraphs of the Rust IR evaluator showed a harsh truth: the interpreter's own logic was only 9% of the render time. 82% was malloc, free, clone, and drop glue from deep-copying owned strings, vectors, and maps at every field read and loop iteration.
Moving Value payloads to reference-counted handles, borrowing read-only paths, and pairing the host with mimalloc cut catalog render time from 1.003 ms down to 82 µs. Over the full arena run, peak resident memory dropped from 388 MB down to 135.2 MB (vs Astro's 632 MB, Next's 669 MB, and Nuxt's 791 MB), and spawn-to-first-200 landed at 14 ms.
2. Ditching JSON for plan.sexp
plan.json was verbose. Serde's external tagging spent twenty bytes just to represent 0.
In September, the plan artifact stopped being JSON and became an S-expression parsed by a hand-rolled scanner in Rust:
(component routes/error.tsx#default
(render
(el main
((class "page failed") ($chunk 5))
(el section
((class "empty"))
(el h1 () "That did not load")
(el p ((class "reason")) {(. $props error)})))))
Across eight example apps, plan.sexp came out 90% smaller than the pretty JSON we used to write and 38% smaller than compact JSON with all whitespace stripped. Even MessagePack binary came out larger (50 KB vs 42.7 KB for shopping), because when your AST consists of thousands of tiny leaf nodes, a binary type byte costs more than a 1-byte ASCII parenthesis.
Dogfooding It Live on snapfirers.com
I redesigned snapfirers.com to make every claim observable on the page itself:
- Live request tracing in the hero: Every load embeds the actual microsecond breakdown of the Rust request that served you (routing, loaders, render, session save).
- Five frameworks, one store: On the homepage, a React island, a zero-JS Server Island (
mode="server"), a Vue island, a Web Component, and a Tera + htmx fragment all read and mutate the same typed store key in one document. - Live IR panes: The TypeScript vs
plan.sexpinspector regenerates from real source files on every build of the site. - 30 hands-on tutorials: Learn covers everything from building a zero-JS counter and mixing React + Vue on one page to strict CSPs, Next.js migration, and embedding FSR into an existing Rust binary.
The entire production site, the main app plus the mounted /fsr/docs and /fsr/learn subsites—runs out of one single binary on DigitalOcean in 87 MiB of RAM.
Zero Node.js. Zero node_modules. Zero cold starts.
Try It
cargo install snapfire_fsr_cli
fsr new my-app --with react
fsr dev my-app/app
- Website & Live Trace: snapfirers.com
- SnapFire FSR Tutorials: snapfirers.com/fsr/learn
- Framework Comparison: snapfirers.com/fsr/compare
- Arena Repo & Raw Data: github.com/excsn/web_ssr_arena
- SnapFire Source: github.com/excsn/snapfire