Article

Astro 6.0: Real Runtimes in Dev, Plus Fonts and Live Content

Astro 6.0 runs Workers, Bun, and Deno locally for true production parity, adds a built-in Fonts API and live content collections, and makes Node 22 the floor.

Editorial Team EN

Astro 6.0 is out. It is not one marquee feature but a stack of changes that touch how developers debug locally, load fonts, and decide when content goes stale.

A dev server that runs your real runtime

The redesigned astro dev runs real production runtimes locally. Built on Vite's Environment API, it can execute Cloudflare Workers, Bun, and Deno on the machine, so the runtime under the debugger matches the one that ships. The old model only approximated production: a bug surfaced after deploy, then you guessed at the cause. With parity, the edge runtime's quirks show up while a debugger is still attached.

Cloudflare bindings, end to end

The rebuilt @astrojs/cloudflare adapter is the clearest case. It runs workerd at dev time, during prerender, and in production, with full access to KV, D1, R2, and Durable Objects bindings. A project reading from D1 or writing to R2 hits the real binding API while developing, not a mock. The adapter keeps gaining Cloudflare-specific ergonomics in later releases, including the cf() helper added in Astro 6.4.

Fonts, handled

The built-in Fonts API takes over the tedious parts: it downloads fonts, caches them, generates optimized fallbacks to cut layout shift, and emits the preload links. It works with local files or providers like Google and Fontsource. Fallback generation is the part to watch. Mismatched fallback metrics are a common source of cumulative layout shift, and hand-tuning them is fiddly work most teams skip; pushing it into the framework means a typography choice no longer quietly costs a Core Web Vitals score.

Live content collections

Live Content Collections fetch content at request time through the unified content layer. Content updates without a rebuild: for a site pulling from a CMS or external API, an editor's change shows on the next request instead of after a redeploy. Paired with the new dev server, the data path under the debugger is the data path that ships. For anyone on a headless CMS, that combination is the most consequential thing in the release.

Built-in Content Security Policy

A built-in CSP config auto-hashes scripts and styles and emits the headers for both static and dynamic pages. Writing a correct policy by hand is error-prone: one missed hash and a script silently fails. Handing the hashing to the build removes that class of mistake.

Experimental: a Rust compiler and faster rendering

Three performance items land behind experimental flags. A Rust-based .astro compiler replaces the Go version, with faster compiles and better diagnostics. Queued Rendering uses a two-pass approach measured at up to 2x faster. Route Caching adds a platform-agnostic layer built on web-standard cache semantics, so it is not tied to one host. Experimental means the APIs can still move: worth trying on a branch, not on anything you cannot afford to rework.

Breaking changes before you upgrade

Node.js 22 is now the floor, dropping 18 and 20, so check CI images and deploy targets first. Vite 7 lands across Astro and every @astrojs package, Shiki 4 powers syntax highlighting, and Zod 4 handles content-schema validation. Budget time for the version bumps rather than expecting a drop-in upgrade.

The through-line is parity: debug against the runtime that ships, and serve content that updates without a redeploy. The feature-by-feature guide to Astro 6 covers each change in depth, and the rest of the Astro coverage tracks the point releases that follow.