Rust SSR vs Next.js: Cold Starts and Type Errors, Tested
A hands-on comparison of Rust server-side rendering and Next.js on two axes: cold-start time and type-error handling. The harness runs two routes in each stack — an HTML page with a 200-item list, and a signup POST that parses and validates JSON — then measures process spawn to first 200 OK, 100 runs per configuration, p50 with p95 and min–max recorded. Three separate numbers are kept separate on purpose: the Rust release binary, the Next.js standalone production server, and the Next.js dev server compiling a route on first request. Only two of those are production measurements. The second half compares what each type system stops. Rust rejects a non-exhaustive match at compile time and Serde rejects malformed payloads at the boundary. TypeScript runs a check in next build, but ignoreBuildErrors turns it off, as casts assert shapes without verifying them, and an untyped JSON body has no type at all. One caveat the post is explicit about: Topcoat itself was not benchmarked, because it couldn't be installed. The Rust figures describe axum with askama, the plainest HTTP-plus-template stack matching the shape the report describes — so treat them as the cost of the language and rendering model, not of any specific framework runtime. Full harness, commands and caveats: https://hackyjs.com/posts/testing-topcoats-rust-ssr-against-nextjs-on-cold-starts-and-type-errors